Original Post
I keep getting this error stating that "clone() has protected access in java.lang.Object" Why can''t I use clone?
The base class:
public abstract class Shape implements Cloneable
Rect is defined liek this:
public class Rect extends Shape
void function( Shape s )
{
Rect rectCopy = (Rect)s.clone(); // This generates the error
}