Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.profi.constructors;
- public class Main {
- public static void main(String[] args) {
- Person person1 = new Person();
- Person person2 = new Person("Alex", 20);
- Person person3 = new Person("John");
- Person person4 = new Person("Sergey",27, "543534534");
- System.out.println(person2.getAge());
- person1.setAge(-55);
- person1.print();
- person2.print();
- person3.print();
- person4.print();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement