This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes clone() not visible ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "clone() not visible ??" Watch "clone() not visible ??" New topic

clone() not visible ??

henry wu

Joined: Dec 01, 2000
Posts: 23
I'm trying to use the clone() method and I'm getting this error message :
The method clone() from the type java.lang.Object is not visible.
I'm added the "implements Cloneable" to the base class and the subclass of the object created. Any suggestions?
henry wu

Joined: Dec 01, 2000
Posts: 23
I have to add that in the class that I'm trying to clone I have :
public Object clone() throws CloneNotSupportedException {
return super.clone();
I'll try replacing return super.clone(); with some code and see what happens.
I agree. Here's the link:
subject: clone() not visible ??
It's not a secret anymore!