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
how to deploy apache tomcat server to weblogic server in java
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What are the major advantages of internal iteration over external iteration?
What is a numeric format?
Can we have two methods in a class with the same name?
What is called module?
What is a data structure java?
What are the methods available in a class?
What is void class in java?
Is string thread safe in java?
What is object data type?
What environment variables do I need to set on my machine in order to be able to run java programs?
Difference between linkedlist and arraylist.
What are the java ide's? Explain
What is the use of predicate in java 8?