More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. Storing the state of an object in a file or other medium is called serialization.
Classes can communicate only if they are built together ( as they need Byte code for communication ). What if we need to enable communication between different applications ( i.e they have been built independently or even they reside at different locations ), We need a mechanism that will transfer the Bean state to a Medium than can be transferred to the receiving application.
Help us improve. Please let us know the company, where you were asked this question :
public static void main (String args[]) {
String localVariable = "local Variable";
}
}
Where will the value 'static Variable' be stored ?
Stack Memory Segment
Heap Memory Segment
Runtime Constant Pool within Heap Segment
Code Segment
Which of following memory segment is cleaned by Garbage Collection Mechanism ?
Stack
Heap
Code
Cache
Very Frequently asked. Favorite question in walkins and telephonic interviews. Usually among first few questions. Asked in different variants. Must know for intermediate and expert professionals.Among Top 10 frequently asked questions.
Q7. What is rule regarding overriding equals and hashCode method ?
Ans. Everytime an object is serialized the java serialization mechanism automatically computes a hash value by passing the meta information for the class. This id is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization
Help us improve. Please let us know the company, where you were asked this question :