Java Aptitude

Java MCQ

Java Practice MCQ 4

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

    A.

    B.

    C.

    D.

  2. Which of the following statement is incorrect?

    A.

    B.

    C.

    D.

  3. What is a suitable return type of a method that does not return any value?

    A.

    B.

    C.

    D.

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

    A.

    B.

    C.

    D.

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

    A.

    B.

    C.

    D.

  6. Which keyword is used to refer to the current object that invoked it?

    A.

    B.

    C.

    D.

  7. Which operator is in Java to free the garbage memory?

    A.

    B.

    C.

    D.

  8. Which method is called by garbage collector before it claims the garbage?

    A.

    B.

    C.

    D.

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

    A.

    B.

    C.

    D.

  10. What is true about constructor?

    A.

    B.

    C.

    D.


Please Share this page