-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRuman.java
More file actions
30 lines (27 loc) · 877 Bytes
/
Copy pathRuman.java
File metadata and controls
30 lines (27 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package Animal;
public class Ruman {
public static class Human {
byte age;
String name;
String secondName;
String favoriteSport;
Human() {
}
public Human(byte age, String name, String secondName, String favoriteSport) {
this.age = age;
this.name = name;
this.secondName = secondName;
this.favoriteSport = favoriteSport;
}
public Human(byte age, String name, String secondName) {
this.age = age;
this.name = name;
this.secondName = secondName;
}
}
public static void main(String[] args) {
Human Andrey = new Human();
Human Alexey = new Human((byte) 25,"Алексей", "Петров", "футбол");
Human Roman = new Human((byte) 35,"Роман", "Иванов");
}
}