Hi Everyone:
A liitle confused here about entering info in a Arraylist.
is this how you enter data.
call up the arraylist
Employees = new ArrayList<Emplo yee>();
Employee emp0 = new Employee(0);
emp0.setid("AV1 234");
emp0setlname("D oe");
emp0setfname("J ohn");
...
Employee emp1= new Employee(1);
emp1.setid("AV1 235");
emp1setlname("J ames");
...
if not can you please tell me how. I have read about this an now I'm getting more confused about it.
Many Thanks
nomad
PS if so where do I add the info. at the class where I made the arraylist?
A liitle confused here about entering info in a Arraylist.
is this how you enter data.
call up the arraylist
Employees = new ArrayList<Emplo yee>();
Employee emp0 = new Employee(0);
emp0.setid("AV1 234");
emp0setlname("D oe");
emp0setfname("J ohn");
...
Employee emp1= new Employee(1);
emp1.setid("AV1 235");
emp1setlname("J ames");
...
if not can you please tell me how. I have read about this an now I'm getting more confused about it.
Many Thanks
nomad
PS if so where do I add the info. at the class where I made the arraylist?
Comment