Question #192389

4. Which access modifier can prevent methods of a class being overridden? Please select "A, B, C, D, or E" as correct option. 


A. public

B. private

C. static

D. protected

E. final


Expert's answer

You can use privatestatic and final modifier to prevent method overriding, but you should always use final modifier to prevent overriding. Final is best way to say a method is complete and can't be overridden.

Answer:

E. final



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS