0

Can anyone explain me elaborately why the first code working and 2nd one not working?

class Actors{ public void nature(){ System.out.println("dialogue"); } } class Vadivelu{ public static void main(String []args){ Actors v = new Actors(){ @Override public void nature(){ System.out.println("silakkidumma"); } }; v.nature(); } }*/ class Actors{ public void nature(){ System.out.println("dialogue"); } } class Vadivelu extends Actors { public static void main(String

13th Mar 2018, 12:57 PM
Marana Coder
Marana Coder - avatar
1 Resposta
+ 2
You need to attach the code with the question, if you do it like this as you can see your code is cropped because of the limit on the question description character count.
13th Mar 2018, 2:29 PM
Ipang