Java Interview Questions & Answers part 8

0
358
Q: – Garbage collector thread belongs to which priority?

low-priority

Q: –Which method waits for the thread to die ?

 join() method

Q: – Can constructor be inherited?

No

Q: – What is an EntrySet View?

Entry Set view is a set that is returned by the entrySet() method in the map and contains Objects of type Map.

Q: – Can null value be added to a List?

Yes

Q: – What is Dictionary class?

The Dictionary class is the abstract super class of Hashtable and Properties class.Dictionary provides the abstarct functions used to store and retrieve objects by key value. This class allows any object to be used as a key or value.

Q: – What is the Hashtable class?

The Hashtable class implements a hash table data structure. A hash table indexes and stores objects in a dictionary using hash codes as the objects' keys.

Q: – What are all the four states associated in the thread?

new
runnable
blocked
dead

Q: – What is a KeySet View ?

KeySet is a set returned by the keySet() method of the Map Interface, It is a set that contains all the keys present in the Map.

Submitted By:-Ankur Jain           Email-ID: – ankurjain548@gmail.com

SHARE

LEAVE A REPLY