From f010b12533fd2b7d30c2e8a320d4245e5ab0bce4 Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 1 Aug 2019 19:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B4=E6=95=B0=E5=8A=A0?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java/src/HelloWorld.java | 3 +++ java/src/MyMath.java | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 java/src/MyMath.java 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); +}