FileDocCategorySizeDatePackage
Clone1.javaAPI DocExample526Fri Sep 12 10:10:30 BST 2003None

Clone1

public class Clone1 extends Object implements Cloneable
Demonstration of cloning.

Fields Summary
int
x
transient int
y
Constructors Summary
Methods Summary
public java.lang.Objectclone()
Clone this object. Call super.clone() to do the work

		try {
			return super.clone();
		} catch (CloneNotSupportedException ex) {
			System.out.println("Now that's a surprise!!");
			throw new InternalError(ex.toString());
		}
	
public java.lang.StringtoString()
Display the current object as a string

		return "Clone1[" + x + "," + y + "]";