Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Ques 91. What is Externalizable?

Ans. Externalizable is an Interface that extends Serializable Interface. And sends data into Streams in Compressed Format. It has two methods, writeExternal(ObjectOuput out) and readExternal(ObjectInput in)

Is it helpful? Add Comment View Comments
Ques 92. What modifiers are allowed for methods in an Interface?
Ans. Only public and abstract modifiers are allowed for methods in interfaces.
Is it helpful? Add Comment View Comments
Ques 93. What is a local, member and a class variable?
Ans. Variables declared within a method are 'local' variables. Variables declared within the class i.e not within any methods are 'member' variables (global variables). Variables declared within the class i.e not within any methods and are defined as 'static' are class variables.
Is it helpful? Add Comment View Comments
Ques 94. What are the different identifier states of a Thread?
Ans. The different identifiers of a Thread are: R - Running or runnable thread, S - Suspended thread, CW - Thread waiting on a condition variable, MW - Thread waiting on a monitor lock, MS - Thread suspended waiting on a monitor lock
Is it helpful? Add Comment View Comments
Ques 95. What are some alternatives to inheritance?
Ans. Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message you forward, because the instance is of a known class, rather than a new class, and because it doesn't force you to accept all the methods of the super class: you can provide only the methods that really make sense. On the other hand, it makes you write more code, and it is harder to re-use (because it is not a subclass).
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook