What is the native keyword in Java for?

后端 未结 10 1523
粉色の甜心
粉色の甜心 2020-11-22 10:52

While playing this puzzle (It\'s a Java keyword trivia game), I came across the native keyword.

What is the native keyword in Java used for?

10条回答
  •  执念已碎
    2020-11-22 11:46

    functions that implement native code are declared native.

    The Java Native Interface (JNI) is a programming framework that enables Java code running in a Java Virtual Machine (JVM) to call, and to be called by, native applications (programs specific to a hardware and operating system platform) and libraries written in other languages such as C, C++ and assembly.

    http://en.wikipedia.org/wiki/Java_Native_Interface

提交回复
热议问题