0

what is anonymous classes

what is anonymous classes is simple word ? in below code what is @override? and explain this all code class Machine { public void start() { System.out.println("Starting..."); } } class Program { public static void main(String[ ] args) { Machine m = new Machine() { @Override public void start() { System.out.println("Wooooo"); } }; m.start(); } }

10th Aug 2019, 12:42 PM
Ratnesh Tiwari
Ratnesh Tiwari - avatar
3 ответов
0
yes output coming "woooo"
10th Aug 2019, 1:05 PM
Ratnesh Tiwari
Ratnesh Tiwari - avatar