answersLogoWhite

0

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

13y ago

What else can I help you with?

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?


Did native Americans use fences?

No the native americans did not use fences.


How do native amereicans transpertate?

Native Americans historically transported goods and people using a variety of methods, including canoes made from birch bark or dugout trees for waterways, and dogsleds or pack animals for land travel. They also utilized sleds made from wood and animal skins, especially in colder regions. In modern times, many Native American communities use contemporary vehicles, but traditional methods remain significant for cultural practices and ceremonies.


What methods should I use to look for phone?

What methods should I use to look for phone?


How do you use native in a sentence?

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


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 are the history of Comanche native Americans?

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


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 dis the US government use to remove native Americans from western land so that non-Indians could use it?

The U.S. government employed several methods to remove Native Americans from western lands, including military force, treaties that were often coerced or violated, and the establishment of reservations. Key policies, such as the Indian Removal Act of 1830, facilitated the forced relocation of tribes, exemplified by the Trail of Tears. Additionally, the government used legal means to undermine Native American land rights and promote westward expansion through initiatives like the Homestead Act.


When to use which methods?

good by