What is the result?

Given:

What is the result?
A. True false
B. True null
C. Compilation fails
D. A NullPointerException is thrown at runtime

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “What is the result?

  1. public static void main(String[] args) {
    Boolean bool[] = new Boolean[2];
    bool[0]= new Boolean(Boolean.parseBoolean(“true”));
    bool[1]= new Boolean(null);
    System.out.println(bool[0]);
    System.out.println(bool[1]);
    }//result true false

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.