This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes overriding access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "overriding access" Watch "overriding access" New topic

overriding access

Jasper Vader
Ranch Hand

Joined: Jan 10, 2003
Posts: 284
here is an answer that was to today's question at examulator... i have an issue with number 4.
1) To be overridden a method must have the same name, parameter types and return type.
To be overriden the return type does matter

3) classes that are marked as final may not be overriden
4) an overriding method cannot have more access (be more public) than the method being overriden
... what's that again? i thought that an overriding method HAD to have more public or equal access than the overridden method?

giddee up
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You are correct.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Jasper Vader
Ranch Hand

Joined: Jan 10, 2003
Posts: 284
...and examulator is wrong? if so, i must email them and inform them.
Jasper Vader
Ranch Hand

Joined: Jan 10, 2003
Posts: 284
yes, well, they are wrong really. so yes i will email them.
I agree. Here's the link:
subject: overriding access
Similar Threads
Examulator Question
Overriding method doubt
Jaworski Java 2 Programmer Exam Quiz
Regarding Over-riding :