Java Programming - Language Fundamentals - Discussion

Discussion Forum : Language Fundamentals - General Questions (Q.No. 4)
Which is a reserved word in the Java programming language?
Answer: Option

The word "native" is a valid keyword, used to modify a method declaration.

Option A, D and E are not keywords. Option C is wrong because the keyword for subclassing in Java is extends, not 'subclasses'.

25 comments Page 1 of 3.

Naresh Reddy said:   7 years ago
'native' is a reserved keyword in Java. It is used to modify the methods and implementation of code can be done in other languages (c, c++).

Where to use this 'native' keyword?

When You need to call a library from Java that is written in other languages. Because while developing any application (or) something.

In such cases Java may not support your needs, then we can write code in other language and add it to the Java library.

Now we can access that library by using 'native' keyword. (ie. JNI) Java native interface.

I hope that this will make you understand a till bit better.

Priya said:   8 years ago
What is the use of native keyword?

Why we use native?

M.Samuel said:   8 years ago
Excellent explanation, Thank you.

Prashant said:   9 years ago
Can any one please briefly explain the concept of native keyword? So that we can understand the exact use of native in Java programming please and thanks in advance.

Jaswanth Nelam said:   4 years ago

No, it's not a return type, it is a keyword.

Manupriya said:   6 years ago
Thanks for the answer @Naresh.

Rushikesh said:   6 years ago
native is the return type of method or function.

Mahendra said:   7 years ago
Thank you friends.

Hitesh said:   7 years ago
Thanks @Naresh.

Shubham said:   7 years ago
Thanks @Naresh.

Post your comments here:

Your comments will be displayed after verification.