public class PhoneList
extends java.lang.Object
implements java.io.Serializable
Phone
objects.Constructor and Description |
---|
PhoneList()
Deprecated.
Constructs a new, empty PhoneList.
|
PhoneList(int initialSize)
Deprecated.
Constructs a new, empty PhoneList, with the initial capacity specified.
|
public PhoneList()
public PhoneList(int initialSize)
initialSize
- the initial capacity of the PhoneList.public void add(Phone phone)
Phone
to the PhoneList.phone
- the Phone to be added.public Phone get(int index)
Phone
at the specified index.int
- the index of the Phone to be retrieved.public int size()
Phone
objects in the PhoneList.