Notes personnelles
Human.java
public class Human {
String name;
int age;
String country;
void walk() {
System.out.println("marcher");
}
void sleep() {
System.out.println("dormir");
}
}
SoccerPlayer.java
public class SoccerPlayer extends Human {
void run() {
System.out.println("Courir");
}
void kick() {
System.out.println("Donner un coup");
}
public static void main(String[] args) {
SoccerPlayer soccer = new SoccerPlayer();
soccer.walk();
soccer.sleep();
soccer.run();
soccer.kick();
}
}
Recommended Posts