interface A{ public void test(){ System.out.println(1); } }
A.
1
B.
compile time error
C.
runtime error
D.
none of the above
Answer and Explanation
Answer:compile time error
Explanation: In an interface all methods are by default public abstract , so interface methods should not have body , here in the example test() method has body so it will throw compile time error.