Java Programming - Language Fundamentals - Discussion

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

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'.

Discussion:
25 comments Page 2 of 3.

Nandhini said:   1 decade ago
Native is like different in java keyword.

Shibasis nayak said:   1 decade ago
Native is a keyword that is used in java which identify that a method whose body can be implemented by outside of java class.

Syntax: Native return type method();

Prashant said:   1 decade 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.

Rajeev said:   10 years ago
In the question it's about reserved word and the reserved words in java are goto and const.

Papuagri Rama devi said:   9 years ago
Tell me, how to use keyword native in programming?

Vishnu said:   9 years ago
In which way, 'native' is a reserved word in Java?

M.Samuel said:   9 years ago
Excellent explanation, Thank you.
(1)

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

Why we use native?
(1)

Naresh Reddy said:   9 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.
(18)

Shubham said:   9 years ago
Thanks @Naresh.
(1)


Post your comments here:

Your comments will be displayed after verification.