package com.lixing.base02;
/**
* @author: ZH
* @date: 2019/11/20 19:51
* @description: Object类
*/
public class ObjectTest {
public static void main(String[] args) {
new Object();
//ZH总结 除了toString equals不是native方法,其他都是native方法
//主要方法有 getClass equals hashcode toString wait notify notifyAll
}
}
/*
class Object0 {
private static native void registerNatives();
static {
registerNatives();
}
public final native Class getClass();
public native int hashCode();
public boolean equals(java.lang.Object obj) {
return (this == obj);
}
protected native java.lang.Object clone() throws CloneNotSupportedException;
public String toString() {
return getClass().getName() + "@" + Integer.toHexString(hashCode());
}
public final native void notify();
public final native void notifyAll();
public final native void wait(long timeout) throws InterruptedException;
protected void finalize() throws Throwable { }
}
*/
网友评论