What is the difference between
Float f1 = 120.0f;
Float f2 = 120.00f;
if(f1==120.00f)
{
System.out.println("Equal");
}
else
System.out.println("Not Equal");
here i am getting Equal as output and
if(f1==f2)
{
System.out.println("Equal");
}
else
System.out.println("Not Equal");
here,i am getting not equal as output. What is difference between literal comparison and variable comparison