Basic Java Interview Question and Answers
41. | Explain the use of "Native" keyword? |
---|---|
Used in method declarations to specify that the method is not implemented in the same Java source file, but rather in another language. | |
42. | What must a class do to implement an interface? |
---|---|
It must provide all of the methods in the interface and identify the interface in its implements clause. | |
43. | What is called Serialization? |
---|---|
Serialization is the process of writing the state of an object to a byte stream. This is more useful when the state of a program has to be saved to a persistent storage area, such as a file. Serialization is also needed to implement Remote Method Invocation (RMI). | |
44. | How can we implement polymorphism in Java? |
---|---|
|
|