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 oops in java?
What is the common usage of serialization?
What is the importance of hashcode() and equals() methods?
What is the maximum size of byte array in java?
What are autoboxing and unboxing? When does it occur?
What is anagram of a string?
How does hashmap work in java ?
How many characters is 2 bytes?
Why is singleton instance static?
What is the difference between a factory and abstract factory pattern?
Difference between object instantiation and construction ?
What is the size of an array?
Does java allow default arguments?
Why do we need wrapper class?
What is object-oriented paradigm?