2015-10-23 18:19:48 -04:00
|
|
|
import jni
|
2021-03-15 09:57:36 -04:00
|
|
|
|
2015-10-23 18:19:48 -04:00
|
|
|
try:
|
|
|
|
Integer = jni.cls("java/lang/Integer")
|
|
|
|
except:
|
|
|
|
print("SKIP")
|
2017-06-10 13:14:16 -04:00
|
|
|
raise SystemExit
|
2015-10-23 18:19:48 -04: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)
|