Create Quiz

Java.lang Package Java technologies Quiz

Java.lang Package Java technologies Quiz

Java.lang package in Java. Provides classes that are fundamental to the design of the Java programming language. The most important classes are Object, which is the root of the class hierarchy, and Class, instances of which represent classes at run time.

You can mute/unmute sounds from here

You May Get Result Of Java.lang Package Java technologies Quiz

The Result is here. Your score is less than 25% of right answer.
The Result is here. Your score is between 25-50% of right answer.
The Result is here. Your score is between 51-75% of right answer.
The Result is here. Your score is more than 75% of right answer.
POST YOUR ANSWER (READ ANSWERS)

Quiz Questions And Answers

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

Compile time Exception
Error
Runtime - NullPointerException

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

Vector
CopyOnWriteArraySet
CopyOnWriteArrayList
ConcurrentSkipListSet

Which of those is synchronized and isn't sorted by natural order?

EnumSet
LinkedList
ConcurrentSkipListSet
Vector

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?

Compilation error
UnsupportedOperationException
ConcurrentModificationException

Which interface should be implemented for sorting on basis of many criteria’s?

Comparator
Comparable
Serializable

Can two threads on same ConcurrentHashMap object access it concurrently

We need to add additional functionality to achieve the same.
Its not possible
Different threads will access different|completely different} segments concurrently

LinkedHashSet implements:

Set
Cloneable
Serializable
All of the above

In WeakHashMap

An entry are automatically removed by garbage collector
Behaves normally like HashMap
An entry are never removed by garb

A EnumSet

Can use enum and non enum type keys
Is specialised Set implementation for use with enum type k
Cannot use enum type keys

Iterator returned by HashSet is

Fail-fast
Fail-safe
None of the above

Iterator returned by CopyOnWriteArraySet is

Fail-fast
Fail-safe
None of the above

Iterator returned by TreeSet is

Fail-fast
Fail-safe
None of the above

Iterator returned by LinkedHashSet is

Fail-fast
Fail-safe
None of the above

Iterator returned by ConcurrentSkipListSet is

Fail-fast
Fail-safe
None of the above

Which List is synchronized?

Vector
CopyOnWriteArrayList
Both the above
ANSWERS

Currently, we have no comments. Be first to comment on this quiz.

Java.lang Package Java technologies Quiz : Test Trivia

Ultimate impossible accurate personality honest Quiz Game

How do you rate this quiz?

Average rating 4.8 / 5. Vote: 5
Embed This Quiz
Copy the code below to embed this quiz