Could anyone please me why the output of the following programme is not \" different different\"?
public static void main(String[] args)
{
float f1=3.2f;
fl
Because 3.2f is a float value and 3.2 is a double value. Floating point numbers are always slightly inaccurate because binary representation cannot implement them accurately, so comparing them for exact equality is a bad idea. Particularly comparing floats with doubles. Expressions such as 3.2f == 3.2f are usually okay, but even those can fail in some languages, e.g. if they represent numbers in registers more accurately than in memory.