Given:
What is the result?
A. 100
210
B. Compilation fails due to an error in line n1
C. Compilation fails due to an error at line n2
D. Compilation fails due to an error at line n3
Given:
What is the result?
A. 100
210
B. Compilation fails due to an error in line n1
C. Compilation fails due to an error at line n2
D. Compilation fails due to an error at line n3
I think the answer should be D.
Test.java produces this error:
error: DoClass() is not public in DoClass; cannot be accessed from outside package
DoInterface doi = new DoClass();
This means that the DoClass() constructor has default (package private) visibility and is not visible to the Test class, which is outside package P3.