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


Please Help Members By Posting Answers For Below Questions

Where are register variables stored?

594


What is the use of parse function in java?

517


Explain the importance of throws keyword in java?

573


What is the exact difference in between Unicast and Multicast object?

1517


What is the gregoriancalendar class in java programming?

574






What is oop in java?

533


What do you mean by garbage collection used in java?

579


Name few "optional" classes introduced with java 8 ?

651


How to find the largest value from the given array.

528


what is abstract class in Java?

652


what is a green thread? : Java thread

576


What is the difference between yielding and sleeping?

562


What is variable and example?

522


What is constructor and virtual function? Can we call a virtual function in a constructor?

685


Is there a case when finally will not execute?

569