diff options
Diffstat (limited to 'tests/jni/object.py')
-rw-r--r-- | tests/jni/object.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/jni/object.py b/tests/jni/object.py new file mode 100644 index 0000000000..6cf936c4d0 --- /dev/null +++ b/tests/jni/object.py @@ -0,0 +1,16 @@ +import sys +import jni +try: + Integer = jni.cls("java/lang/Integer") +except: + print("SKIP") + sys.exit() + +# Create object +i = Integer(42) +print(i) +# Call object method +print(i.hashCode()) +# Pass object to another method +System = jni.cls("java/lang/System") +System.out.println(i) |