class if{ public static void main (String args[]){ int x = 9; if (x <= 9){ System.out.println(\"Yay\"); }else{
You shouldn't call a class "if". It's a reserved Java keyword (that you're using in your program, BTW).
Furthermore, by convention, all classes start with an uppercase letter in Java.