欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Object

程序员文章站 2024-03-04 15:32:35
...
/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 
// Source File Name:   Object.java

package java.lang;

// Referenced classes of package java.lang:
//            StringBuilder, IllegalArgumentException, CloneNotSupportedException, InterruptedException, 
//            Throwable, Class, Integer, String

public class Object
{

    public Object()
    {
    }

    private static native void registerNatives();

    public final native Class getClass();

    public native int hashCode();

    public boolean equals(Object obj)
    {
        return this == obj;
    }

    protected native Object clone()
        throws CloneNotSupportedException;

    public String toString()
    {
        return (new StringBuilder()).append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).toString();
    }

    public final native void notify();

    public final native void notifyAll();

    public final native void wait(long l)
        throws InterruptedException;

    public final void wait(long l, int i)
        throws InterruptedException
    {
        if(l < 0L)
            throw new IllegalArgumentException("timeout value is negative");
        if(i < 0 || i > 999999)
            throw new IllegalArgumentException("nanosecond timeout value out of range");
        if(i >= 500000 || i != 0 && l == 0L)
            l++;
        wait(l);
    }

    public final void wait()
        throws InterruptedException
    {
        wait(0L);
    }

    protected void finalize()
        throws Throwable
    {
    }

    static 
    {
        registerNatives();
    }
}


/*
	DECOMPILATION REPORT

	Decompiled from: D:\Java\JRE\lib\rt.jar
	Total time: 93 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
*/


Object


面试遇到问题。因为面试人不同,没遇到合适的而已。虽然我们经常用Object这个对象,但是我还真没太注意里面的方法。看看吧。