Java Aptitude

Java MCQ

Java Random MCQ

  1. Which method is called before garbage is collected in java?

    A.

    B.

    C.

    D.

  2. Which keyword specify the exception that a method may throw?

    A.

    B.

    C.

    D.

  3. 'this' in java can be used to: 1. Refer to the current class instance variables 2. Refer to current class methods 3. Refer to current class constructors

    A.

    B.

    C.

    D.

  4. Which of the following entity has same name as that of the class?

    A.

    B.

    C.

    D.

  5. Which of these is used to access member of class before object of that class is created?

    A.

    B.

    C.

    D.

  6. Correct extension of compiled java files is

    A.

    B.

    C.

    D.

  7. Which can be declared only once in a program?

    A.

    B.

    C.

    D.

  8. What is the marker interface in java?

    A.

    B.

    C.

    D.

  9. Guess output: System.out.print("java"+ 10+ 30+ 40);

    A.

    B.

    C.

    D.

  10. Can we mark constructor as private?

    A.

    B.

    C.

    D.


Please Share this page
Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!