CloneClass.java 285 B

123456789101112131415161718
  1. package samples.technology.reference;
  2. class CloneClass implements Cloneable{
  3. public int aInt;
  4. public Object clone(){
  5. CloneClass o = null;
  6. try{
  7. o = (CloneClass)super.clone();
  8. }catch(CloneNotSupportedException e){
  9. e.printStackTrace();
  10. }
  11. return o;
  12. }
  13. }