int a=1;
float b=1.0;
System.out.println(a==b);
Answer Posted / aruna
this code will not compile since 1.0 will be taken as a
double instead of float, To make this code work, the
following changes shud b done
float b=1.0f;
or double = 1.0;
with these changes the SOP statement will print "true"
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
Can java inner class be static?
Why can't we use static class instead of singleton?
Can you explain inner class.
What is the benefit of singleton pattern?
What is difference between java and java ee?
how its run?
How do you check if two strings are equal in java?
what is the constructor and how many types of constructors are used in java?
Are maps ordered java?
What is space character in java?
What is a package in java? List down various advantages of packages.
What is comparable and comparator interface? List their differences
What is the purpose of using javap?
How strings are created in java?
What is meant by polymorphism?