This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collection " Watch "Collection " New topic


Muhammad Usman

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"

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 (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
I agree. Here's the link:
subject: Collection
It's not a secret anymore!