Overriding why does this not work anyone? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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