• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Questions on java.util package

 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q1)When you want to associate keys with values and you are using JDK1.2, which of the following classes are preferred?
a] Dictionary
b] HashTable
c] Properties
d] HashMap
e] TreeMap
answer given : d,e.
Q2)Which of the following are true about the following Vector
Vector v=new Vector (5,10)
a] Incorrect declaration
b] Initial capacity is 10 and capacity increment is 10
c] Initial capacity is 5 and capacity increment is 10
d] Initial capacity is 5 and capacity increment is 0
e] The default capacity increment of Vector is 10
Answer given : c,e.
Q3)If you want to read and evaluate expressions which of the following would you prefer?
a] Array
b] List
c] Vector
d] Stack
e] Map
Answer given : d.
Q4)Which of the following allows you to use null values?
a] HashSet
b] HashMap
c] HashTable
d] AbstractList
Answer given : a,b,d.
Q5)True or false?
a] Vector maintains their elements in insertion order
b] A Vector cannot expand more than its capacity
c] Vector provides only synchronized addition methods
d] Vectors holds only objects not primitives
Answer given : d.
Q6)Which of the following supports insertion, deletion and store growth very easier?
a] Array storage
b] Tree
c] Hashing
d] Linked List
Answer given : b,c,d.
Q7)Which of the following are true about BitSet
a] Individual bits cannot be examined, set or cleared.
b] The bit set will increase dynamically as needed to accommodate extra bits you add it.
Answer given : false, true.
Q8)Which of the following classes that are thread-safe?
a] HashMap and HashSet
b] Vector and HashSet
c] HashTable and Dictionary
d] Vector and HashTable
Answer given : d.
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
amit, try to keep your posts to one question. This makes it easier to search and easier for everyone to respond to.
Bill
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic