This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes OOP 3 - Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "OOP 3 - Question" Watch "OOP 3 - Question" New topic

OOP 3 - Question

Rory Lynch
Ranch Hand

Joined: Aug 03, 2007
Posts: 95
I am currently working on OOP3 SortNames. One of the objectives of the assignment is to learn about implementing Interfaces.

I would like to ask a question without going into detail or giving anything away hopefully.

In my solution to this assignment (currently undergoing scrutiny) I have implemented an Interface. My understanding is that when you implement an Interface your class must override every method of the Inteface.

I have left one method out, it is in the Interface but not in my class and it works
I dont know why it works
But I am sure you can tell me
otherwise I shall remain

I wish that for just one time, you could stand inside my shoes.<br />You'd know what a drag it is to see you.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9056
What class does your class extend? I know that it also implements an interface, but every class extends a particular class by default if one is not specified. Does that parent class implement that method of the interface that you're wondering about?

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rory Lynch
Ranch Hand

Joined: Aug 03, 2007
Posts: 95

Thank you.
I agree. Here's the link:
subject: OOP 3 - Question
It's not a secret anymore!