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)

TCS Other Question

If the user does not pass value to argument, what is the value of arguments provided at the time of function declaration that are automatically assign by the compiler called?

A. Pass by value argument
B. Pass by reference argument
C. Default argument
D. User defined argument
What is the CORRECT full form of SPRAE - a generic structured testing approach?

A. Specification-Premeditation-Repeatability-Accountability-Evaluation
B. Specification-Programming-Randomization-Accountability-Economy
C. Specification-Programming-Repeatability-Accountability-Economy
D. Specification-Premeditation-Repeatability-Accountability-Economy