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 :
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote
Help us improve. Please let us know the company, where you were asked this question :
Ans. The accessibility (public, protected, etc.) of the inner class is defined by the outer class.
Just like top-level classes, an inner class can extend a class or can implement interfaces.
Similarly, an inner class can be extended by other classes, and an inner interface can be implemented or extended by other classes or interfaces.
An inner class can be declared final or abstract.Inner classes can have inner classes, but you will have a hard time reading or understanding such complex nesting of classes.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Yes, We can call garbage collector directly but it doesn't guarantees that the gc will start executing immediately. This gc( ) method appears in both Runtime and System classes of java.lang package.
Help us improve. Please let us know the company, where you were asked this question :
Ans. BlockingQueue is a Queue that supports operations that wait for the queue to become non-empty when retrieving and removing an element, and wait for space to become available in the queue when adding an element.
Help us improve. Please let us know the company, where you were asked this question :