int a=1;
float b=1.0;
System.out.println(a==b);
Answer Posted / anil kumar rai
error found when compile this code;
if u write 1 in place of 1.0 then output would be "true" or
if u write double in place of float then output would be
same :"true"
thank you
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is the purpose of a parameter?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
Difference between == and .equals() ?
What are features of java?
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
What is main method?
Which list is sorted in java?
What is one third plus one third as a fraction?
What is member in java?
What is an abstract class and what is it’s purpose?
Can we declare an array without size in java?
What is scope & storage allocation of global and extern variables? Explain with an example
What is object-oriented programming?
Why are lists ordered in java?
What is static block?