© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu

Home Placements Interview Questions Java Interview Questions And Answers Java Interview Questions On Utility Package ▼

Java Interview Questions On Utility Package

9. What is the Map interface?

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

10. What is the Vector class?

Answer
The Vector class provides the capability to implement a growable array of objects .

11. What is the Set interface?

Answer
The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements

12.What is the Difference between HashMap and HashTable?

Answer
The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow). HashMap does not guarantee that the order of the map will remain constant over time. HashMap is non synchronized and Hashtable is synchronized.

13. What is the difference between Vector and ArrayList?

Answer
Vector is synchronized whereas arraylist is not.

14. What is an Iterators?

Answer
Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collection at the time the Iterator was obtained; generally it is not advisable to modify the collection itself while traversing an Iterator.

15. What is the Locale class?

Answer
The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region.

Previous End
1 2
SLogix Student Projects
bottom