Return to site

JAVA CERTIFICATION QUESTION: Accessing public, private, protected, and default classes in Java

· java,ocp

Java’s four access control levels increase accessibility from private to default (which has no keyword), then to protected, and then to public.

Given the following:




Which line, when inserted individually at line n1, compiles successfully? Choose one.


B. drive();

C. Compilation of the obj.stop();

D. Compilation of the stop();







·ꓭ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ