class Autobox2{
public static void main(String[] args){
Float A=9.0F;
float a=(float)9.0;
System.out.print(A.equals(a));
//System.out.print(a.equals(A));
System.out.print(a<=A);
System.out.print(A<=a);
}
}
The answer is given below, but i m unable to get it, can somebody explain it to me?
The above program show an error in line 6. The reason is that here we are attmpting to dereference the primitive type float, which is not allowed.
public static void main(String[] args){
Float A=9.0F;
float a=(float)9.0;
System.out.print(A.equals(a));
//System.out.print(a.equals(A));
System.out.print(a<=A);
System.out.print(A<=a);
}
}
The answer is given below, but i m unable to get it, can somebody explain it to me?
The above program show an error in line 6. The reason is that here we are attmpting to dereference the primitive type float, which is not allowed.