24 lines
399 B
Java
24 lines
399 B
Java
public class HumanMain{
|
|
|
|
|
|
|
|
public static void main(String[] args){
|
|
|
|
|
|
Name NameA = new Name ("Alex", "Hoden");
|
|
|
|
Adress AdressA = new Adress ("Kaiserschmarn", 2);
|
|
|
|
Human Alex = new Human (NameA, AdressA);
|
|
|
|
Human Axel = new Human(Alex);
|
|
|
|
Alex.greet();
|
|
Axel.greet();
|
|
|
|
Axel.setFirst("Axel");
|
|
|
|
Axel.greet();
|
|
Alex.greet();
|
|
}
|
|
} |