Series: Subject: Topic:
Question: 1080 of 1115

What is a native method

A native method is a method that is implemented in a language other than Java.
Asked by: Interview Candidate | Asked on: Aug 25th, 2004
Showing Answers 1 - 2 of 2 Answers

Answered On : Mar 10th, 2006


         Can be applied to methods only. (static methods also)

         Written in a non-Java language, compiled for a single machine target type.

         Java classes use lot of native methods for performance and for accessing hardware Java is not aware of.

         Native method signature should be terminated by a ;, curly braces will provide a compiler error.

         native doesnt affect access qualifiers. Native methods can be private.

         Can pass/return Java objects from native methods.

Login to rate this answer.

Answered On : Aug 11th, 2007

Informs the compiler that the method has been used in a non-java platform and used only with the methods.

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.