first of all, I have a class called appointment that have get variable(such as Time, Date and STring)method in it, and I have a second class called ListArrayBased. Inside, I have a method that can return an Object.
Appointment abc = new Appointment(Time, Date, String)
ListArrayBased def = new ListArrayBased()
ok...here is the question...how can I get the variable/things inside the object
I can't go for...object.getTime() inside the ListArrayBased class to retrieve the Time variable inside the object...what can I do...
u can use get the object from the arraylist by using the getter methods and assign it to a Object pointer of the Class type by typecasting it and then use the object to do whatever u want with it,
u can use something like this
1. int index=def.lastIndexOf(<object>);
2. Appointment abc =(Appointment)def.get(index);
and if u know the index of the object in the arraylist u can skip line 1.