Java Aptitude

Java MCQ

Java Practice MCQ 6

  1. Which statement(s) is correct about finally. 1. finally can be placed at the end after catch block or in between them. 2. If case of normal program flow finally is not executed. 3. finally is useful in case there is some clean up activity like closing open connection, etc to be performed. 4. finally should be placed only after the last catch block, if catch block is used.

    A.

    B.

    C.

    D.

  2. What is the marker interface in java?

    A.

    B.

    C.

    D.

  3. Parsing in java refers to

    A.

    B.

    C.

    D.

  4. What is the base class of Error in java?

    A.

    B.

    C.

    D.

  5. Which of the following is method of Object class?

    A.

    B.

    C.

    D.

  6. Using which of the following ways we can access a method in java: 1 invoking a method declared in the same class. 2 invoking a method using reference of the class. 3 invoking an inherited method.

    A.

    B.

    C.

    D.

  7. How many String objects are created for below code in java? String s1 = "java"; String s2 = "java";

    A.

    B.

    C.

    D.

  8. Java is secure as a programming language because of?

    A.

    B.

    C.

    D.

  9. '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.

  10. _______ variable shares same memory space

    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!