int a=1;
float b=1.0;
System.out.println(a==b);
Answer Posted / ranga reddy
int a = 1;
float b = 1.0;
System.out.println(a==b);
if we declare float b = 1.o; by default it takes double value, then it will give compile time error as possiblelossofpression
then we declare as float b = 1.0f;
at this time System.out.println(a==b); gives
true
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Explain constructors and types of constructors in java.
Can we have multiple catch block for a try block?
Can we serialize singleton class?
Explain yield() method in thread class ?
Where is java located?
why Java does not support multiple inheritances?
Explain listiterator and methods in listiterator?
Define how does a try statement determine which catch clause should be used to handle an exception?
How do I run java on windows?
What is the difference between static binding and dynamic binding?
Explain tree set and its features?
How do listeners work?
Can a class extend 2 classes in java?
Are maps ordered java?
Explain features of interfaces in java?