Java Aptitude

Java MCQ

Java Random MCQ

  1. Which keyword is used to explicitly throw an exception?

    A.

    B.

    C.

    D.

  2. Which exception is thrown when divide by zero statement executes?

    A.

    B.

    C.

    D.

  3. String in java is a

    A.

    B.

    C.

    D.

  4. Parent class variable can be referred using

    A.

    B.

    C.

    D.

  5. Can a java class be inherited by more than one class?

    A.

    B.

    C.

    D.

  6. Which of the following is valid declaration of object in java?

    A.

    B.

    C.

    D.

  7. Correct extension of compiled java files is

    A.

    B.

    C.

    D.

  8. Which of the following is not OOP concept?

    A.

    B.

    C.

    D.

  9. What would be behavior if constructor has a return type?

    A.

    B.

    C.

    D.

  10. Can we have multiple public class in java?

    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!