Java util-the utility classes


Question 1: What do you mean by the term vector? How is it distinct from an array?

Question 2: What do you mean by the term legacy classes?

Question 3: Illustrate the difference between Hash table and String classes?

Question 4: Illustrate the usages of Observer Interface?

Question 5: Which of the given statements regarding the java.util.Vector and java.util.Hashtable classes are correct?

a) A vector can hold object references or the primitive values.
b) A vector maintains the object references in the order they were added.
c) A Hash table needs string objects as keys.
d) A Hash table maintains object references in the order they were added.

Question 6: An object of the Hash table class can store and retrieve object references based on the related "key" objects. Which of the given interfaces does Hash table implement?

a) SortedMap
b) Map

Question 7: Write down a program to create an array to store the 12 months of a year. By using Stack, display these months in the reverse order.

Question 8: Write down a program to store the command line arguments in a vector object. Change the content of second element. Insert new element at a specific location. Delete an item at particular location. Convert the vector into array of strings and display the Strings.

Question 9: Write down a program to input name and birthdate of a person. Determine his age.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Java util-the utility classes
Reference No:- TGS08751

Expected delivery within 24 Hours