jniexample1.java

来自「< Professional Java,JDK 5 Edition>」· Java 代码 · 共 12 行

JAVA
12
字号

public class JNIExample1 {
	public native int addTwoNumbers(int one, int two);

	public static void main(String args[])
	{
		JNIExample1 ex1 = new JNIExample1();

		System.loadLibrary("AddTwoNumbers");
		System.out.println("The sum of 1 and 2 is " + ex1.addTwoNumbers(1,2));
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?