Home » JAVA Programming » Basic Datatypes » Question
  1. What is the output of this program?

    class output {
    public static void main(String args[])
    {
    boolean var11 = true;
    boolean var12 = false;
    if (var12)
    {
    System.out.println(var12);
    }
    else
    {
    System.out.println(var11);
    }
    }
    }

    1. 0
    2. false
    3. true
    4. 1
    5. None of these
Correct Option: B

here: var12 = false
output: false



Your comments will be displayed only after manual approval.