This commit is contained in:
Joel Dice
2007-08-14 19:14:55 -06:00
parent 71c7013808
commit f22dda0df1
11 changed files with 129 additions and 18 deletions

View File

@ -1,7 +1,15 @@
package java.lang;
public class Object {
protected native Object clone() throws CloneNotSupportedException;
protected Object clone() throws CloneNotSupportedException {
if (this instanceof Cloneable) {
return clone(this);
} else {
throw new CloneNotSupportedException();
}
}
private static native Object clone(Object o);
public boolean equals(Object o) {
return this == o;