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 we override constructors in java?
Which software is used for java programming?
Can private class be inherited in java?
What does the “static” keyword mean?
Can set contain duplicates?
Is arraylist dynamic in java?
Where is const variable stored?
What is the default access specifier for variables and methods of a class?
What is java english?
What are the different approaches to implement a function to generate a random number?
What is difference between length and length() method in java ?
Is simpledateformat safe to use in the multithreaded program?
What are access specifiers available in java?
Explain about automatic type conversion in java?
Explain the purpose of garbage collection in Java?