answersLogoWhite

0


Best Answer

The native modifier indicates that a method is implemented in platform-dependent code (Not Java Of Course), but often in C. There wont be any questions about how to use native methods for the exam. For now it is enough if you know that native is a modifier (thus a reserved keyword) and that native can be applied only to methods-not classes, not variables, just methods. Note that a native method's body must be a semicolon (;) (like abstract methods), indicating that the implementation is omitted.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the native methods how do you use them?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Native method in java?

The native modifier indicates that a method is implemented in platform-dependent code (Not Java Of Course), but often in C. The native keyword can be applied only to methods-not classes, not variables, just methods. Note that a native method's body must be a semicolon (;) (like abstract methods), indicating that the implementation is omitted


What is foreign keyword in java?

There is no "foreign" keyword in Java, however, there is a native keyword that declares native methods in a native language, such as C or C++.For full list of keywords in Java see related question.


What does the native keyword do in Java?

The native keyword is used to tell Java that the method you are defining is actually implemented in machine-specific compiled code outside of Java. It is mainly used to import existing libraries of code compiled in C into Java, but is also used for the "low level" stuff which must be written specifically for each platform. If you try to look through the Java source code for how things like Sockets or the Math class are implemented, you will soon run into native methods. See the related link below for a well written example of how to use native methods yourself.


Can instance methods replace class methods in programming?

No. never. An instance method cannot replace a class method because: Instance Methods - are normal methods that are linked to a class object instance Class Methods - are static methods that are not linked to any class object. These methods are not interchangeable and will create too many issues if we try to use one in place of the other.


What do you use if you want to ensure that all methods and properties are implemented?

polymorphism

Related questions

Did Native Americans In the southwest use dry farming methods?

Yes


Native method in java?

The native modifier indicates that a method is implemented in platform-dependent code (Not Java Of Course), but often in C. The native keyword can be applied only to methods-not classes, not variables, just methods. Note that a native method's body must be a semicolon (;) (like abstract methods), indicating that the implementation is omitted


What methods did the mabo use to protest?

What methods did Eddie Mabo use to protest?


What methods should I use to look for phone?

What methods should I use to look for phone?


Did native Americans use fences?

No the native americans did not use fences.


What are the history of Comanche native Americans?

Hunting, Customs,Shelter,Food,Tools,Hunting Methods.


What is foreign keyword in java?

There is no "foreign" keyword in Java, however, there is a native keyword that declares native methods in a native language, such as C or C++.For full list of keywords in Java see related question.


When to use which methods?

good by


What methods did the us use to gain land in pacific?

the methods they might use is to go to war and fight for the land


How do you use native in a sentence?

You use it as an adjective. For example, "My native homeland is Spain."


What methods did Native Americans use to predict the weather?

Native Americans used to predict the weather based on their observations of the sky, nature and animals. Some of these methods are used as proverbs such as: "Red sky at night, sailors delight. Red sky in morning, sailors take warning", "Clear Moon, frost soon" and "Rainbow in the morning gives you fair warning".


What methods besides weighing and measuring are use for charging systems?

subcooling methods