marastalv
5/29/2013 - 1:30 PM

clonar objeto en java

clonar objeto en java

//Debemos implementar la clase Cloneable

public ImagePlaneDB clone() throws CloneNotSupportedException {
  	Object obj = null;
		try {
			obj = super.clone();
		} catch (CloneNotSupportedException ex) {
			ex.printStackTrace();
		}
		return (ImagePlaneDB) obj;
	}