Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 35 of 90
Free Preview · 90 of 299 · questions 1–90 of 299 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Answer is B
B is the right answer. If you extend a class from the parent class, you can use parent methods in child methods. Otherwise, if you implement the class, it will be necessary to implement as well all its methods, so the desired code will need to be replicated many times.
Interface is the most suitable when we want specific behavior on many otherwise unrelated classes - C