R
RC
In Vector class
there are methods:
boolean add(E o)
Appends the specified element to the end of this Vector.
void addElement(E o)
Adds the specified component to the end of this vector,
increasing its size by one.
E get(int index)
Returns the element at the specified position in this Vector.
E elementAt(int index)
Returns the component at the specified index.
What is element? what is component?
Please give the examples.
P.S. in ArrayList class, there are only
boolean add(E o)
E get(int index)
So in ArrayList class you can only add/get elements,
But you can't addElement(E o)/elementAt(int index)
Why?
Thanks Q very much in advance!
there are methods:
boolean add(E o)
Appends the specified element to the end of this Vector.
void addElement(E o)
Adds the specified component to the end of this vector,
increasing its size by one.
E get(int index)
Returns the element at the specified position in this Vector.
E elementAt(int index)
Returns the component at the specified index.
What is element? what is component?
Please give the examples.
P.S. in ArrayList class, there are only
boolean add(E o)
E get(int index)
So in ArrayList class you can only add/get elements,
But you can't addElement(E o)/elementAt(int index)
Why?
Thanks Q very much in advance!