• Post Reply Bookmark Topic Watch Topic
  • New Topic

clone() not visible ??  RSS feed

 
henry wu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
 
henry wu
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!