VL-Programmieren/VL08/Aufgabe04/PersonenDH/Person.java

17 lines
298 B
Java

package VL08.Aufgabe04.PersonenDH;
public class Person {
String name;
int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public void print() {
System.out.printf("Name: %s\n", this.name);
System.out.printf("Alter: %d\n", this.age);
}
}