Hi, i have created a class for example People, and then another class PeopleList
the PeopleList class uses the People Class to make an array list of the type people.
in the People class i have a method:
public String toString() { ..... code }
from the PeopleList class I have done public ArrayList<People> myPeopleList = new ArrayList<People>();
and i ccan type in myPeopleList. and the IDE brings up the available methods etc, and toString() is there so i can do myPeopleList.toString();
In the People class i have now added another method:
but from the PeopleList class when i do myPeopleList. , the toMyFormat() method is not shown and i cannot use it.public String toMyFormat() { ..... code }
I dont understand why this is happening, could someone please explain?
Thank You.