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 are the various access specifiers in java?
Is null a value?
What is length in java?
What is the purpose of checked and unchecked exceptions in JAVA?
What does main method?
Why do you canvas?
What are different types of references?
What is off heap memory?
What is the difference between a synchronized method and a synchronized block?
What is comparator in java?
What is arraylist e?
Why do we need singleton?
What are actual parameters?
What is java util list?
Difference between object instantiation and construction ?