Java Aptitude

Java MCQ

Java Practice MCQ 7

  1. String s = "java"; s.concat("coders"); System.out.print(s); Guess the value of s

    A.

    B.

    C.

    D.

  2. Which of the following is an example of checked exception in java?

    A.

    B.

    C.

    D.

  3. How would you sort collection having user-defined object in java?

    A.

    B.

    C.

    D.

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

    A.

    B.

    C.

    D.

  5. Java is __________ typed language

    A.

    B.

    C.

    D.

  6. Which of the following automatic type conversion is possible?

    A.

    B.

    C.

    D.

  7. What will be the return type of a method that not returns any value?

    A.

    B.

    C.

    D.

  8. What is value of Math.floor(4.6)?

    A.

    B.

    C.

    D.

  9. Which of the modifier can't be used for constructors?

    A.

    B.

    C.

    D.

  10. Why main method should be static?

    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!