Guest User

Untitled

a guest
Jun 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. public class Person
  2. /*Example of overloading...in this case constructors.*/
  3. {
  4. private String name;
  5. private int age;
  6. public Person(String name)
  7. {
  8. this.name = name;
  9. }
  10. public Person(String name, int age)
  11. {
  12. this.name = name;
  13. this.age = age;
  14. }
  15. }
Add Comment
Please, Sign In to add comment