Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //will work as expected
- //both Person() and Person(var, var,var) are defined functions of the class Person
- Person testP = new Person("Name", "Nachname", "mail@mail.com");
- testP.setEmail("mail2@mail.com");
- data.add(testP);
- //will fail horribly
- Person testP2 = new Person();
- testP2.setEmail("mail2@mail.com");
- testP2.setFirstName("Michael");
- testP2.setLastName("Sloawiks");
- data.add(testP2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement