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


Please Help Members By Posting Answers For Below Questions

how to deploy apache tomcat server to weblogic server in java

1599


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

596


What are the major advantages of internal iteration over external iteration?

575


What is a numeric format?

569


Can we have two methods in a class with the same name?

582






What is called module?

568


What is a data structure java?

504


What are the methods available in a class?

587


What is void class in java?

528


Is string thread safe in java?

578


What is object data type?

569


What environment variables do I need to set on my machine in order to be able to run java programs?

603


Difference between linkedlist and arraylist.

591


What are the java ide's? Explain

523


What is the use of predicate in java 8?

492