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 is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Can we overload the main() method?
What is class forname?
What is integer size in java?
What is the difference between throw and throws in java?
What is the difference between a constructor and a method?
What java is used for?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What are thread safe functions?
Why scanner is used in java?
Is string pool garbage collected?
What is the difference between a field variable and a local variable?
What is tostring () method?
Is it possible to override the main method?
Can we call a non-static method from inside a static method?