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
How do you declare a string variable?
Explain parallel processing in java8?
Is char a method in java?
What is data member in java?
is there a separate stack for each thread in java? : Java thread
What is volatile data type?
What are some alternatives to inheritance?
how many types of Inheritance?
Can I extend singleton class in java?
What is a java lambda expression?
What is the difference between jfc & wfc?
Why is a singleton bad?
What is the purpose of the system class in java programming?
How do you add spaces in java?
Why does java does not support multiple inheritance? Explain