0
We cannot create objects of interfaces and abstract classes because they declare methods, but do not define their body and you can't have methods without saying what they do. If you had interface B{ int met(); } class A { void fun(){ System.out.print(new B().met()); }} What would be the output?
12th Mar 2018, 3:55 PM
michal