Question -
What will be the output? 1. public interface InfA{ 2. protected String getName(); 3. } public class Test implements InfA{ public String getName(){ return "test-name"; } public static void main (String[] args){ Test t = new Test(); System.out.println(t.getName()); } }
Options:
A .  test-name
B .  Compilation fails due to an error on lines 2
C .  Compilation fails due to an error on lines 1
D .  Compilation succeed but Runtime Exception
Submit Your Solution hear: