Home > MCQs > IT & Programming > Java MCQs

Java MCQ

Java Quick Quiz

Question 1 of 10
  • By which method does Java pass data?

    Answer & Explanation

    Correct Answer: Pass by value only.

    Note: This Question is unanswered, help us to find answer for this one

  • 4

    Answer & Explanation

    Correct Answer: 8

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following lines will not throw a compile time error?

    Answer & Explanation

    Correct Answer: int []a1[] = new int[3][3];

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following variable declarations is illegal in Java?

    Answer & Explanation

    Correct Answer: List myVar;

    Note: This Question is unanswered, help us to find answer for this one

  • What is the default scope of a method?

    Answer & Explanation

    Correct Answer: package-private

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following IS NOT a property of the equals() method?

    Answer & Explanation

    Correct Answer: atomic

    Note: This Question is unanswered, help us to find answer for this one

  • Is it possible to create zero length arrays?

    Answer & Explanation

    Correct Answer: Yes, you can create arrays of any type with length zero

    Note: This Question is unanswered, help us to find answer for this one

  • The foreach loop in Java is constructed as:

    Answer & Explanation

    Correct Answer: for (Object o : collection)

    Note: This Question is unanswered, help us to find answer for this one

  • Java is a pure object oriented language. true or false?

    Answer & Explanation

    Correct Answer: false

    Note: This Question is unanswered, help us to find answer for this one

  • Java interfaces can extend...

    Answer & Explanation

    Correct Answer: multiple interfaces.

    Note: This Question is unanswered, help us to find answer for this one

  • Java Quick Quiz

    battery

    Poor Results!

    You need a lot of improvement.

    Just don't give up!

    Correct Answers: 0/10

    Start Practicing with our MCQs given below.