diff --git a/java/src/HelloWorld.java b/java/src/HelloWorld.java index f064af0..aade241 100644 --- a/java/src/HelloWorld.java +++ b/java/src/HelloWorld.java @@ -9,5 +9,8 @@ class HelloWorld { public static void main(String[] args) { String output = HelloWorld.hello("fanruan"); System.out.println(output); + + int r = MyMath.add(50, 32); + System.out.println(r); } } \ No newline at end of file diff --git a/java/src/MyMath.java b/java/src/MyMath.java new file mode 100644 index 0000000..bb5dabd --- /dev/null +++ b/java/src/MyMath.java @@ -0,0 +1,9 @@ +/** + * @author richie + * @version 10.0 + * Created by richie on 2019-08-01 + */ +public class MyMath { + + public static native int add(int a, int b); +}