0

These are some methods in java.lang.Object class, I was going through...

 protected native Object clone() throws CloneNotSupportedException;

 public final native Class<?> getClass();

 public native int hashCode();

 public final native void notify();

 private static native void registerNatives();

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

why are these methods define as native? Please share reference and further reading docs if possible.

Source : java.lang.Object

4
  • Last one does not exist. Any reason why they shouldn't be native? Commented Jun 16, 2017 at 9:45
  • @EJP updated. Also the above link explain what is native. Im asking why native. Commented Jun 16, 2017 at 10:37
  • @EJP Idk, frankly speaking, Im not an expert about native thats why I want to know some strong reason for it. Commented Jun 16, 2017 at 10:39
  • Read the duplicate, you will understand what is it, then you could guess why they could be natives (for some at least). Commented Jun 16, 2017 at 10:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.