what are the purposes of native, transiant key words?

Answers were Sorted based on User's Feedback



what are the purposes of native, transiant key words?..

Answer / 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

what are the purposes of native, transiant key words?..

Answer / ravikiran

native is the keyword used for methods to cll the methods
defined in a platform dependent language like c

transient is the keywrd used infront of varibles which will
restirct the process of serialization

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Core Java Interview Questions

Explain how hashmap works?

0 Answers  


Which all r Final classes in java except string?

5 Answers   HCL,


Where are global variables stored?

0 Answers  


What is consumer interface?

0 Answers  


what is java bean?where can we use it?

12 Answers   TCS,






What is the purpose of abstract class?

0 Answers  


Is char a method in java?

0 Answers  


What do you mean by order of precedence and associativity?

0 Answers  


How do you use spaces in java?

0 Answers  


waht You know about thread programming?

1 Answers  


Can a string be null?

0 Answers  


What is exception handling in java?

0 Answers  


Categories