int a=1;
float b=1.0;
System.out.println(a==b);
Answer Posted / ranga reddy
int a = 1;
float b = 1.0;
System.out.println(a==b);
if we declare float b = 1.o; by default it takes double value, then it will give compile time error as possiblelossofpression
then we declare as float b = 1.0f;
at this time System.out.println(a==b); gives
true
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why is a singleton bad?
What is boolean used for?
What are the features of java?
What is the difference between reader/writer and inputstream/output stream?
How to convert string to char and vice versa?
Can a constructor call another constructor?
What is flush () in java?
Is the milky way in a void?
What are the different types of inheritance in java?
What are the disadvantages of object oriented programming?
What is the relationship difference the canvas class and the graphics class?
What is the main function in java?
What is complexity and its types?
What are the different approaches to implement a function to generate a random number?
Write a java program to check if a number is prime or not?