Charles Bell
Posts: 519
Nickname: charles
Registered: Feb, 2002
|
|
Re: Arrays
|
Posted: Mar 2, 2002 8:00 PM
|
|
You need to create a class called Person with any necessary data fields to hold the data on a given person, such as name, position, etc. then in you Database program create and add Person objects to a Vector object Persons.
Vectors are easier to add elements to, delete elements from, etc. because they grow with data size.
class Person{
String name = "";
String position = "";
public Person(String name, String position){
this.name = name;
this.position = position;
}
}
|
|