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 inherit a class with private constructor?
What are the supported platforms by java programming language?
How to convert string to char and vice versa?
What is an example of a boolean?
how we can create packages in java?
Is zero a positive integer?
Why does java have two ways to create child threads?
Print Vertical traversal of a Binary Tree.
What is split return?
Is it possible for a yielded thread to get chance for its execution again?
can any body body expalin best definitions & best real time exaples for opps concepts.
Can a singleton class be inherited?
Mention some features of java?
What is return used for in java?
What is a line break?