Core Java MCQ Questions | Java Online Challenge

1. Java MCQ Test

We have covered most of the parts of Java Quiz. Today, we will see Java MCQ part 5. This part of Java MCQ contains Java multiple choice questions with their answers. To know the answer of questions asked in Java MCQ, click on the below check boxes given in each question. You will then get a correct answer. Follow the given link to understand Java Programming Language well.

So, let’s start the Java MCQ online test.

Java MCQ

Core Java MCQ Questions | Java Online Challenge

Q.1 In Iterator, hasMoreElements() method of Enumeration has been changed to:

Correct! Wrong!

Q.2 TreeSet internally uses that one to store elements?

Correct! Wrong!

Q.3 HashSet internally uses?

Correct! Wrong!

Q.4 An attempt to add the null key to a TreeSet will result in:

Correct! Wrong!

Q.5 TreeSet maintains which order?

Correct! Wrong!

Q.6 Enumeration returned by ArrayList is

Correct! Wrong!

Q.7 LinkedHashMap permits

Correct! Wrong!

Q.8 Hashtable permits

Correct! Wrong!

Q.9 How are you able to sort given HashMap on basis of values

Correct! Wrong!

Q.10 The Comparator interface contains the method?

Correct! Wrong!

Join DataFlair on Telegram

Q.11 What will Collections.sort internally uses when number of elements are less than 7?

Correct! Wrong!

Q.12 What do Collections.sort internally uses once a number of elements are greater than 7?

Correct! Wrong!

Q.13 An attempt to add null key to a TreeMap will result in:

Correct! Wrong!

Q.14 What will be the output of the following code -

Java Quiz Five Q.14
Correct! Wrong!

Q.15 Which of those is synchronized and does not allow null elements?

Correct! Wrong!

Q.16 Which of these is synchronised and isn't sorted by natural order?

Correct! Wrong!

Q.17 What will be the output of the following code -

Java Quiz Five Q.17
Correct! Wrong!

Q.18 What will be the output of the following code -

Correct! Wrong!

Q.19 What will be the output of the following code -

Correct! Wrong!

Q.20 In ListIterator, when a call to next() or previous(), if a call is made to set(E element) followed by add() or remove() what happens?

Correct! Wrong!

See also – 
Java Test Part 4 & Part 6

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.