Iterator
|
Enumeration
|
It is useful to
retrieve object
From a collection
|
It’s also useful
to retrieve object
From a collection
|
Iterator has
methods whose
Names are easy to
follow
|
Enumeration has
methods whose
Names are
difficult to remember
|
Iterator has an
option to remove
Objects from a
collection
|
Which is not
available
|
So Iterator is
preferred than Enumeration
|
What is the difference between Iterator and Enumeration?
What is the difference between Iterator and ListIterator?
- Both are useful to retrieve elements from a collection.
- Iterator can retrieve the elements only in forward direction.
- But ListIterator can retrieve the elements in forward and backward direction also.
- So ListIterator is preferred than Iterator
What is map in collection framework?
- Maps stored elements in the form of key and value pairs.
- If key is provided then its corresponding value can be obtained.
- Of course key should have unique values.
What is a queue in collections framework?
- A queue represents arrangements of elements in FIFO(Firs In First Out) order.
- This means that element that is stored as a first element into the queue will be removed first from the queue.
What is lists in collection framework?
- Lists are like Sets.
- They store a group of elements,
- But Lists allow duplicate values to be stored.
What is a set?
- A set represents a group of elements arranged just like an array.
- The set will grow dynamically when the elements are stored into it.
- A set will not allow duplicate elements.
- If we try to pass same element that is already available in the set, then it is not stored into it.
- Set will not maintain the same order of elements as in which they were entered.
What is the differences between Java5 and Java6?
JAVA-5
|
JAVA-6
|
Also known as Tiger
|
Also known as Mustang
|
|
JAXB 2.0 (JSR 222)
|
Subscribe to:
Posts (Atom)