Android
OA0-002 · Question #79
The following JNIProb.java has been compiled, and the javah command has been run to create the header file JNIProb.h. Which is the correct code that goes into (1) of the C/C++ source file JNIProb.c…
The correct answer is B. jint JNICALL Java_JNIProb_add(JNIEnv*env, jobject o, jint a, jint b). See the full explanation below for the reasoning.
Question
The following JNIProb.java has been compiled, and the javah command has been run to create the header file JNIProb.h. Which is the correct code that goes into (1) of the C/C++ source file JNIProb.c created in this way?
Exhibit
Options
- Aint JNICALL Java_JNIProb_add(JNIEnv*env, jobject o, inta, intb)
- Bjint JNICALL Java_JNIProb_add(JNIEnv*env, jobject o, jint a, jint b)
- Cjint JNICALL add(JNIEnv *env. jobject o. int a. int b)
- Djint JNICALL addfJNIEnv *env, jobject o. jint a. jint b)
How the community answered
(37 responses)- A14% (5)
- B76% (28)
- C8% (3)
- D3% (1)
Community Discussion
No community discussion yet for this question.
