Home » Interview » Technology

What are Native methods in Java?

Correct Answer: Java applications can call code written in C, C++, or assembler This is sometimes done for performance and sometimes to access the underlying host operating system or GUI API using the JNI The steps for doing that are: First write the Java code and compile it Then create a C header file Create C stubs file Write the C code Create shared code library (or DLL) Run application

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion