About Question enthuware.ocpjp.v7.2.1229 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ewebxml
Posts: 77
Joined: Sun Jun 30, 2013 10:04 pm
Contact:

About Question enthuware.ocpjp.v7.2.1229 :

Post by ewebxml »

Question:
For option c, why can't the root class for a hierarchy of related classes be a concrete
parent class?

I understand that in practice you normally make a parent class of
2 concrete subclasses abstract,
as in

Code: Select all

abstract class Employee{}
with concrete subclasses

Code: Select all

HourlyEmployee extends Employee{}
SalariedEmployee extends Employee{}

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1229 :

Post by admin »

You certainly can.
But the question is asking for a valid reason for creating an abstract class and it is certainly a valid reason for an abstract class as well.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests