The Java native interface provides various functions that
can be called to access the Java objects and methods [4]. For
instance, to access arrays, it provides getArrayRegion .
If an array contains objects in Java, each element can be
accessed individually, and whenever we access the data, it is
copied from the Java heap to native region