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
Can a string be null?
What does \ mean in regex?
What is a literal coding?
What is a priority queue java?
What is lazy initialization in java?
How can we create objects if we make the constructor private ?
Explain the difference between treeset and treemap in java?
What is the importance of main method in Java?
What is an infinite loop? How infinite loop is declared?
How finally used under exception handling?
Can I extend singleton class in java?
What is a parameter in matrices?
Is it necessary that each try block must be followed by a catch block?
Explain different states of a thread in java?
How many types of array are there?