R4R
Right Place For Right Person TM
 
R4R Java Advance java Collection Collection Subjective Question and answer Collection Subjective Questions And Answers

 


Tolal:83 Click: 1 2 3 4 5
Previous Home Next

COLLECTION Interview Questions And Answers

Page 1

Ques: 1 What is the Collections API? 

Ans:
The Collections API is a set of classes and interfaces that support operations on collections of objects.

Ques: 2 What is the List interface?

Ans:
The List interface is bassically provides support for ordered collections of objects.

Ques: 3 What is the Vector class?

Ans:
The Vector class is bassically a provides the capability to implement a growable array of objects.

Ques: 4 What is an Iterator interface?

Ans:
The Iterator interface is bassically used to step through the elements of a Collection .

Ques: 5 Which java.util classes and interfaces support event handling? 

Ans:
The EventObject class and the EventListener interface support event Handaling.

Ques: 6 What is the GregorianCalendar class?

Ans:
The GregorianCalendar is bassicallt provides support for traditional Western calendars

Ques: 7 What is the Local class? 

Ans:
The Local class is bassically used to tailor program output to the conventions of a particular geographic, political, or cultural region .

Ques: 8 What is the SimpleTimeZone class?

Ans:
The SimpleTimeZone class is bassically provides support for a Gregorian calendar

Ques: 9 What is the Map interface? 

Ans:
The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.

Ques: 10 What is the highest-level event class of the event-delegation model?

Ans:
The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.

Ques: 11 What is the Collection interface? 

Ans:
The Collection interface is bassically provides support for the implementation of a mathematical bag, An unordered collection of objects that may contain duplicates.

Ques: 12 What is the Set interface? 

Ans:
The Set interface is bassically a use for method which provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.

Ques: 13 What is the typical use of Hashtable?

Ans:
Hash table is very important that time When a program wants to store a key value pair, one can use Hashtable.

Ques: 14 We trying to store an object using a key in a Hashtable. And some other object already exists in that location, then what will happen? The existing object will be overwritten? Or the new object will be stored elsewhere?

Ans:
The existing object will be overwritten and thus it will be lost.

Ques: 15 What is the difference between the size and capacity of a Vector?

Ans:
There are many diff : > The size is the number of elements actually stored in the vector, While capacity is the maximum number of elements it can store at a given instance of time.

Ques: 16 Can a vector contain heterogenous objects?

Ans:
Yes, A Vector can contain heterogenous objects. Because a Vector stores everything in terms of Object.

Ques: 17 Can a ArrayList contain heterogenous objects?

Ans:
Yes, A ArrayList can contain heterogenous objects. Because a ArrayList stores everything in terms of Object.

Ques: 18 What is an enumeration?

Ans:
An enumeration is an interface containing methods for accessing the underlying data structure from which the enumeration is obtained. It is a construct which collection classes return when We request a collection of all the objects stored in the collection. It allows sequential access to all the elements stored in the collection.

Ques: 19 Considering the basic properties of Vector and ArrayList, where will you use Vector and where will you use ArrayList?

Ans:
The basic difference between a Vector and an ArrayList is that : > Vector is synchronized while ArrayList is not. Thus whenever there is a possibility of multiple threads accessing the same instance, one should use Vector. While if not multiple threads are going to access the same instance then use ArrayList. > Non synchronized data structure will give better performance than the synchronized one.

Ques: 20 What is HashMap and Map?

Ans:
Basic diff are there : > Map is Interface and Hashmap is class that implements this interface.


Goto Page:

1 2 3 4 5
Share |

COLLECTION Objective

COLLECTION Objective Questions And Answers

COLLECTION Interview Questions And Answers

COLLECTION Interview Questions And Answers

R4R,COLLECTION Objective, COLLECTION Subjective, COLLECTION Interview Questions And Answers,COLLECTION,COLLECTION Interview,COLLECTION Questions ,COLLECTION Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R