/** * This class will start the demonstration program. * * @author mario */ class Main { /** * This is the starting point of the program * @param args */ public static void main(String[] args) { // create two equal students Human2 mario = new Human2("Mario"); Human2 mario2 = new Human2("Mario"); // create an different student Human luigi = new Human("Luigi"); // print the students System.out.println("Menschen:"); // print an information System.out.println("mario: " + mario); System.out.println("mario2: " + mario2); System.out.println("luigi: " + luigi); System.out.println(); // newline // make some checks of the student System.out.println("Vergleiche:"); System.out.println("Was ergibt \"mario.equals(mario)\"? " + (mario.equals(mario)) ); System.out.println("Was ergibt \"mario.equals(luigi)\"? " + (mario.equals(luigi)) ); System.out.println("Was ergibt \"mario.equals(mario2)\"? " + (mario.equals(mario2)) ); System.out.println(); // newline } }