Explain how the Java Native Interface (JNI) or Android NDK allows Java code to interact with native C++ libraries.