Does Java pass by reference or value to C when using JNI ( more specifically Android NDK)
views:
377answers:
2
+4
A:
It depends on the type. Primitive types are passed by value and reference types by... reference. See http://java.sun.com/docs/books/jni/html/types.html
qwertzui
2009-11-08 21:20:24
+1
A:
I can't speak to Android, but JNI passes values just like Java does, primitive types are passed by value and all objects (including arrays) are passed by reference. The wiki article on JNI is pretty good.
Keith Randall
2009-11-08 21:21:56