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
What are different type of exceptions in java?
How many ways can we create the string object?
What are basic keywords?
What are features of java?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
Explain about assignment statement?
How do you test a method for an exception using junit?
Explain the init method?
What is space character in java?
How can you set an applet’s height and width as a percentage?
What is linked hashmap and its features?
Can we override singleton class?
how we can make a read-only class in java?
What is annotation in java?
Which package is always imported by default?