TCS
Company
Programming
Output
What will be the output of the following java code?
class Operations
{
protected void getMethods()
{
System.out.println("A");
}
}
public class Main extends Operations
{
protected final void getMethods()
{
System.out.println("B");
}
public static void main(String[] args)
{
Operations obj = new Operations();
obj.getMethods();
}
}
Read Solution (Total 1)
-
- A
extends Operations has protected - 3 years agoHelpfull: Yes(0) No(0)
TCS Other Question