Q: | What is the default value of an object reference declared as an instance variable? | |
A: | null unless we define it explicitly. | |
Q: | What type of parameter passing does Java support? | |
A: | In Java the arguments are always passed by value . | |
Q: | Primitive data types are passed by reference or pass by value? | |
A: | Primitive data types are passed by value. | |
Q: | What is serialization? | |
A: | Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream. | |
Q: | Which methods of Serializable interface should I implement? | |
A: | The serializable interface is an empty interface, it does not contain any methods. So we do not implement any methods. | |
No comments:
Post a Comment