Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Student {
- String name;
- int matrikel;
- Professor mentor;
- public void drucke(){
- System.out.print("Der Name des Studenten ist: "+name);
- System.out.print("Seine Matrikelnummer ist: "+matrikel);
- System.out.print("Sein Mentor ist: "+mentor);
- }
- public static void main(String [] args) {
- Student s = new Student();
- s.name = "Caesar Albrecht";
- s.matrikel = 100000;
- Professor p = new Professor();
- p.name = "Bodo Igler";
- System.out.println("s:");
- s.begruesse();
- s.drucke();
- }
- }
Add Comment
Please, Sign In to add comment