Witam
Dlaczego gdy próbuję utworzyć kopię obiektu w ten sposób otrzymuję błąd?
public class Bitmap_Class implements Cloneable{
...
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
Bitmap_Class Graphic_B;
Bitmap_Class Graphic_Source;
public Thread_Game(Bitmap_Class Graphic_B){
this.Graphic_B = Graphic_B;
this.Graphic_Source = (Bitmap_Class) Graphic_B.clone(); //Błąd
}
Error:(141, 61) error: unreported exception CloneNotSupportedException; must be caught or declared to be thrown