BAEL-2323 Adding files for native keyword tutorial (#5913)

* BAEL-2323 Adding files for native keyword tutorial

* junit test files and native library

* update test method name
This commit is contained in:
Urvy Agrawal
2018-12-20 00:26:14 +05:30
committed by maibin
parent 3064a22a7a
commit c28fa5541d
4 changed files with 48 additions and 0 deletions
@@ -0,0 +1,10 @@
package com.baeldung.nativekeyword;
public class DateTimeUtils {
public native String getSystemTime();
static {
System.loadLibrary("nativedatetimeutils");
}
}
@@ -0,0 +1,11 @@
package com.baeldung.nativekeyword;
import com.baeldung.nativekeyword.DateTimeUtils;
public class NativeMainApp {
public static void main(String[] args) {
DateTimeUtils dateTimeUtils = new DateTimeUtils();
String input = dateTimeUtils.getSystemTime();
System.out.println("System time is : " + input);
}
}