What is the result?

Given:

What is the result?
A. int main 1
B. Object main 1
C. String main 1
D. Compilation fails
E. An exception 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(int[] args) {
    System.out.println(“int main”+args[0]);
    }
    public static void main(Object[] args) {
    System.out.println(“Object main”+args[0]);
    }
    public static void main(String[] args) {
    System.out.println(“String main”+args[0]);
    }
    }
    result
    String main1

  2. Answer C:

    Other main methods are overloaded, but they would never act as the starting point of the app.

Leave a Reply

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


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