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

What is nextint java?

0 Answers  


Is string is a data type in java?

0 Answers  


Why Wait and notify are kept in Object class although they are used only with Thread Class

2 Answers   Global Logic, Saksoft,


what is generics in jdk1.5?

2 Answers   Bally Technologies,


Explain 5 io best practices?

0 Answers  






What is the purpose of main function in java?

0 Answers  


What is garbage collection in Java, and how can it be used ?

32 Answers   Accenture, HCL, Infosys, Sara, SITS, TCS, Wipro,


Write a program to print all permutations of string?

0 Answers  


How many types of JVM's (OR) Name of the JVM's which are used in Tomcat & Weblogic servers ?

1 Answers   TCS,


Explain about arraylist?

0 Answers  


What is the default value of an object reference declared as an instance variable?

0 Answers  


Why collection doesn’t extend cloneable and serializable interfaces?

0 Answers  


Categories