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
How concurrent hashmap works?
What is a treemap in java?
What is serialversionuid?
What is byte [] in java?
Why char array is preferred over string for storing password?
java Technical questions asked by JPMC
Is there any way to find whether software installed in the
system is registered by just providing the .exe file?
I have tried the following code but its just displaying the
directory structure in the registry.
Here the code :
package com.msi.intaller;
import java.util.Iterator;
import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RootKey;
public class RegistryFinder {
public static void main(String... args) throws Exception
{
RegistryKey.initialize(RegistryFinder.class.getResource("jRe
gistryKey.dll").getFile());
RegistryKey key = new RegistryKey(RootKey.HKLM,
"Software\\ODBC");
for (Iterator
Describe the Big-O Notation.
What is Classloader in Java?
Can an abstract class be a final class?
Can you write a java class that could be used both as an applet as well as an application?
Is 0 a prime number?
How do you do exponents in java?
What do you mean by buffering?
Can sleep() method causes another thread to sleep?