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
How do you check if two given string are anagrams?
Can singleton class be cloned?
What are the 2 types of java programs?
What is a layout manager and what are different types of layout managers available in java awt?
Why is java so important?
List any five features of java?
How do you reverse sort a list in java?
State two differences between C and Java.
What is the use of using enum to declare a constant?
What is the difference between length and length() method in java?
do I need to use synchronized on setvalue(int)? : Java thread
What are the java ide’s?
Which variables are stored in stack?
What happens when you add a double value to a string?
What is finalize()? Is finalize() similar to a destructor?