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
What is entry in java?
How do you sort in descending order in java using collections sort?
Explain about member inner classes?
Can we change the value of static variable?
What is a substitution variable?
Is empty .java file name a valid source file name?
Why collection doesn’t extend cloneable and serializable interfaces?
Do we need to manually write Copy Constructor?
Where are register variables stored?
What are the 6 mandatory procedures for iso 9001?
What is regex in java?
How to display all the prime numbers between 1 and 100
Implementations of set interface?
Write the algorithm to check the number non-leaf nodes in a tree.
What are the three parts of a lambda expression? What is the type of lambda expression?