Overriding why does this not work anyone? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Overriding why does this not work anyone?

Ball obj2 = new Ball(){ @Override obj2.Bounce(){System.out.println("bounce");}}; obj2.Bounce();

21st Jul 2017, 1:54 PM
D_Stark
D_Stark - avatar
2 Réponses
+ 1
thanks man that helps 👍
21st Jul 2017, 8:26 PM
D_Stark
D_Stark - avatar
0
can you give me an example please not sure if i have the } im the rigjt places
21st Jul 2017, 4:27 PM
D_Stark
D_Stark - avatar