helloworld.java

来自「自己写的用java调用c++写的dll的代码」· Java 代码 · 共 19 行

JAVA
19
字号

public class HelloWorld 
{
	public native int Cal(int i) ;
	static
	{
		System.loadLibrary("testdll") ;		
	}
	
	public static void main(String[] args)
	{
		
		HelloWorld test = new HelloWorld() ;
		int a = 4 ;
		int b = test.Cal(a) ;
		System.out.println("The result is :"+b) ;
	}
}

⌨️ 快捷键说明

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