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
What sorting algorithm does javascript use?
What are the limitations of procedural programming approach?
Can classes declared using the abstract keyword cab be instantiated?
What is size_t?
What is the internal implementation of set in java?
What is return null in java?
How do singleton patterns work?
What is java ceil?
What is Applet Stub Interface ?
What is role of void keyword in declaring functions?
Why does java does not support multiple inheritance? Explain
What are assembly attributes?
what are abstract functions?
What is garbage collection? Can it be forced to run?
Write a program to reverse array in place?