For the second one, where would I add that? When the person is created?
Silly me, I see now :)
Thanks, I'll test it now!
Type: Posts; User: Jarba
For the second one, where would I add that? When the person is created?
Silly me, I see now :)
Thanks, I'll test it now!
Do you have any idea how I could list all of the people created so far?
Thankyou Javapenguin! It worked, with a bit of tweaking!
public class Person {
String forename;
String surname;
int age;
public String getName(Person nameToGet) {
return forename + " " + surname;
}
public Person(String createdForename,...
I have two classes: Person and PersonDemo.
Person holds all the methods, etc, etc, whilst PersonDemo is as named, just for a demo.
However, PersonDemo throws up a lot of errors in my Eclipse...