2015-10-24 01:19:48 +03:00
|
|
|
import jni
|
2021-03-15 19:27:36 +05:30
|
|
|
|
2015-10-24 01:19:48 +03:00
|
|
|
try:
|
|
|
|
Integer = jni.cls("java/lang/Integer")
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 20:14:16 +03:00
|
|
|
raise SystemExit
|
2015-10-24 01:19:48 +03:00
|
|
|
|
|
|
|
# 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)
|