GIAC
GSSP-JAVA · Question #35
GSSP-JAVA Question #35: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-JAVA to reveal the answer and full explanation for question #35. The question stem and answer options stay visible for context.
Question
You write the following code. class Father {public void Method() {System.out.println("I am Father");}} public class Son extends Father {public static void main(String argv[]) {Son son = new Son();son.Method();} private void Method() {System.out.println("I am Son");}} Which of the following will be the result, when you try to compile and run the code?
Options
- AI am Father will be displayed as the output.
- BA runtime error will result.
- CI am Son will be displayed as the output.
- DThe code will execute but without displaying any output.
- EA compile-time error will result.
Unlock GSSP-JAVA to see the answer
You've previewed enough free GSSP-JAVA questions. Unlock GSSP-JAVA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.