Professional Documents
Culture Documents
Department of Information Technology: SRM Institute of Science and Technology Ramapuram Campus Cycle Test - I
Department of Information Technology: SRM Institute of Science and Technology Ramapuram Campus Cycle Test - I
4) Type signature of Boolean 11) Write the machine generated header file code for the following java code:
A) Z B) D C) F D) J
package jni_str_Pkg;
class JNI_strclass
5) To convert to Unicode format string in UTF {
public static String native reverse(String str)
A) GetStringUTFChars() B) ReleaseStringUTFChars() public int[] native Sorting(int a[], float n)
C) ReleaseStringChars() D) getStringChars() /*body of class*/
}
12) List out the functions of JNIEnv argument? B) Explain in detail about implementing the DLL? ( 12 marks)
PART – C (2 X 12 = 24)
Answer ALL Questions
17) A) ) i) Explain in detail about JNI and write the steps for creating JNI
concepts (5 marks)
1) Define a java main class, with one native method which takes array
as an argument “native int maximumOccurence(int arr[])”.
2)Define a C / C++ code to find the maximum occurrence of element in
an array and return the number of occurrences to java.
(OR)
B) i) Brief notes on monitor entry and exit with its necessary snippet? (6 marks)
ii) Brief notes on monitor wait and notify with its necessary snippet? (6
marks)
ii) Write the sample code by using exception handling functions(JNI & C
code)? ( 6 marks)
(OR)