What is the output?

Given the following code:

What is the output?
A. 44
B. 35
C. 47
D. 54
E. 45
F. 4
21

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “What is the output?

  1. public static void main(String[] args) {
    String [] planets={“Mercury”,”Venus”,”Earth”,”Mars”};
    System.out.println(planets.length);
    System.out.println(planets[1].length());
    }
    result :
    4
    5

Leave a Reply

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


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