Return to site

JAVA CERTIFICATION QUESTION: Java abstract classes and access modifiers for abstract methods

It’s essential to declare classes properly to ensure methods are accessible.

· java,ocp

Your software uses two classes that are part of the Object Relational Mapping (ORM) framework.


You have decided to create your own concrete connection class based on the DBConnection class.


A. The Connection class fails to compile.

B. The DBConnection class fails to compile.

C. The ServerDBConnection class cannot be properly implemented.

D. The ServerDBConnection class successfully compiles if you provide the following method inside the class body:

𝑝𝑢𝑏𝑙𝑖𝑐 𝑣𝑜𝑖𝑑 𝑐𝑜𝑛𝑛𝑒𝑐𝑡(𝑆𝑡𝑟𝑖𝑛𝑔 𝑢𝑟𝑙) { /* */ }










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