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

How we can execute any code even before main method?

549


Explain about interthread communication and how it takes place in java?

540


What is meant by object?

570


What is the association?

543


Explain what is encapsulation?

602






What is oop in java?

522


How do I remove a character from a string in java?

494


State the main difference between c++ and java?

588


Can a constructor be private and how are this() and super() method used with constructor?

519


What is a Transient Object?

630


Why main method is called first in java?

541


What is the difference in between cpp and java? Can u explain in detail?

602


can rmi and corba based applications interact ?

662


What is the difference between exception and error in java?

486


What is formatted output?

506