dimanche 1 mars 2015

What in this peaceful blue world is this type of initialization called and why is it used?



Animal is a user defined class here.



Animal D = new Animal("Leo") {

@Override public void makeNoise() {

System.out.println("Roar!");

}

}; D.makeNoise();



Aucun commentaire:

Enregistrer un commentaire