Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

asking about util plz help me out!!!!!!!

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there,
hope u r doin' fine.here r list of questions given below:
Question 1:
Vector is the class of collection n data structure being used by vector is "array".
my question is that if it's array then how it's extensible(bec usually array does not exceed its size n in vector its extensible).
Question 2:
can we use data structure in a interface if yes then how it can be.n if we use data structure in
a interface,wont it be constant.this is making confusions so plz help me out.
thanks in advance
with regards
kumar abhay
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Take a look at source of Vector to see how it is done. The sources of the java classes are typically coming with each JDK in a src.jar or src.zip file.
2) It is not possible to declare a non-public, non-static, non-final field in an interface.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use an Abstract class either. It suits your interests better.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whenever the capacity of the array gets filled a new array is created (double the size or increment value specified) and contents of the old array are copied to the newly created array.
reply
    Bookmark Topic Watch Topic
  • New Topic