Can I use a native method which returns a pointer?
I used the following syntax:
public native int* intArrayMethod(float[] t,int nb_of_subscribers,int tags);
but it indicates an error.
Can I use a native method which returns a pointer? I used the following
Share
You shouldn’t use native pointers in Java because of the differences in data structures between C++ and Java. And Java’s garbage collector.
Your Java class should look like this:
And your C++ code should look like this: