adspace


what are the purposes of native, transiant key words?

Answer Posted / ranganathkini

When a method is marked with the native keyword. Then it
means that the method is implemented externally in a
non-Java language (more likely C/C++).

Native functions are used to perform operations beyond the
control of JVM. Native methods are by default not portable
unlike the Java programs.

A field that is marked by the transient keyword means that
during serialization of the class instance, that field will
be ignored and not serialized.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between heap and stack memory in java?

1151


Write a program to find the whether a number is an Armstrong number or not?

1108


What is a constructor overloading in java?

1132


How to create a base64 decoder in java8?

1151


explain different ways of using thread? : Java thread

1091


Realized?

2276


What is java string pool?

1090


Is minecraft 1.15 out?

1053


What do you mean by an interface in java?

1108


Differentiate between static and non-static methods in java.

1134


What is the difference between equals() and == in java?

1049


What is the difference between break and continue statements?

1133


What is an object in java and how is it created?

1149


Explain public static void main(string args[]) in java.

1086


Write a program to print count of empty strings in java 8?

1093