What is the default value of float and double datatype in Java?

Its my interview question anyone know the correct answer?


If you really wish to find out then declare a float and a double. Then print them to the screen.


public class Test{

    private float myFloat;
    private double myDouble;

    public static void main(String[] args)
        System.out.println("Float: " + myFloat);
        System.out.println("Double: " + myDouble);

ObSys: if you do feel the need to hand out code, at least make it code that will compile.