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 Programmer Certification (SCJP/OCPJP) and the fly likes protected function 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "protected function " Watch "protected function " New topic

protected function

abhishek chauhan

Joined: Jul 21, 2005
Posts: 8
Every Class by default extend the Object Class then why is clone() method declared as protected. It does make any difference if it was declared as public
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
protected is make sense for inheritance.

Java Developer, Thailand
I agree. Here's the link:
subject: protected function
It's not a secret anymore!