>>387
レスありがとうございます。
という事は教本等にある、シャローコピー、ディープコピーとは何に当たるのでしょうか?

cloneableインターフェイスとcloneメソッドですが、「オブジェクトの複製」をする為にあると
思って間違いはないでしょうか?例えば、

public class Data implements Cloneable {

int x;

if (this instanceof Cloneable){

Data d = new Data(何かしらのデータ);
for(int i = 0; i<this.size; i++){
d.x = this.x;
return x;
} else{

throw CloneNotSupportedException;

}

こんな感じで良いのでしょうか?