Java native Modifier
Declaring Native Methods with the native Modifier
The native modifier indicates that the method is a native method, meaning it is implemented in a language other than Java. Therefore, when the native modifier is specified, the method body is omitted from the method definition, and its contents must be implemented separately in a language such as C.
public native int hashCode(); // Body omitted
It is mainly used when sufficient processing speed cannot be expected with Java. However, Java’s processing speed has improved in recent years, so there are not many situations where you must rely on native methods. Specific implementation methods are omitted here.