File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collection " Watch "Collection " New topic
Author

Collection

Muhammad Usman
Greenhorn

Joined: Nov 18, 2001
Posts: 29
hello to all .
as we know, in collection interface we have a class vector and we usually create a vector like that
Vector v = new Vector();
which in turn returns and array v[] of capacity of 10 elements and its type is Object.
how is it possible that we are defining an simple object and in turn it is converting it into an array object.
what i understand that in vector class constructor , there will be some type of code which in turn convert v int v[].
can somebody explain me, how to do that.
i have an idiea of Vector construct like that
Vector() {
Object [] v = new Object [10];
or any use of " this" key word.
i am totally confused.
thanks in advance
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Why don't you just go LOOK? In the jdk they include a src.jar that you can open with any ZIP utility.
From the file Vector.java (minus the JavaDoc stuff that you can see in the API)

[ April 10, 2002: Message edited by: Cindy Glass ]

"JavaRanch, where the deer and the Certified play" - David O'Meara
 
GeeCON Prague 2014
 
subject: Collection