Variables Intro

The Code

The code for the first class of Java is as follows:

package variablesintro;

public class VariablesIntro {

    /**
      * @param args the command line arguments
      */
    public static void main(String[] args) {
        // TODO code application logic here
        float x = 3000;
        float y = 3000;
        float z = x / y;
        
        System.out.println(z);
        
        if (y>x)
        { 
            System.out.println("x is less than y");
        }else if (x>y) {
            System.out.println("x is less than y");
        }else{
            System.out.println("x is equal to y");
        }
    }
    
}