+ 1

js

class Machine { public void start() { System.out.println("Starting..."); } } class Program { public static void main (String[] args) { Machine m1 = new Machine() { @Override public void start () { System.out.println("woooo"); } }; Machine m2 = new Machine (); m2.start(); } } how to come this code op?

19th May 2019, 7:22 PM
Mewan Athukorala
Mewan Athukorala - avatar
1 Odpowiedź
+ 4
It is Java code, please edit your question - remove C++ from Relevant Tags and put Java in instead. And change your question - "js" does not describe your question clearly. Good luck!
19th May 2019, 9:27 PM
Ipang