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?
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 1 of 3.
Jaswanth Nelam said:
4 years ago
@Rushikesh.
No, it's not a return type, it is a keyword.
No, it's not a return type, it is a keyword.
Manupriya said:
7 years ago
Thanks for the answer @Naresh.
Rushikesh said:
7 years ago
native is the return type of method or function.
Mahendra said:
8 years ago
Thank you friends.
Hitesh said:
8 years ago
Thanks @Naresh.
Shubham said:
8 years ago
Thanks @Naresh.
Naresh Reddy said:
8 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.
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.
(14)
Priya said:
8 years ago
What is the use of native keyword?
Why we use native?
Why we use native?
(1)
M.Samuel said:
9 years ago
Excellent explanation, Thank you.
(1)
Vishnu said:
9 years ago
In which way, 'native' is a reserved word in Java?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers