mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 17:10:24 +08:00
16 lines
280 B
Python
16 lines
280 B
Python
import jni
|
|
try:
|
|
Integer = jni.cls("java/lang/Integer")
|
|
except:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
# 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)
|