Interface Java Interview Questions

Can an inner class be built in an Interface? Yes,an inner class may be built an Interface. public interface xyz { static int p=0; void m(); class c { c() {int q; System.out.println(“inside”);}public static void main(String c[]) {System.out.println(“inside “); }};}     Why is explicit object casting needed? In order to assign a superclass object …

Interface Java Interview Questions Read More »