Java Interview Questions - Page 1
Java Interview Questions by Inigo Nirmal
Question: Can a private method of a superclass be declared within a subclass?
Answer: Sure. A private field or method or inner class belongs to its declared class and hides from its subclasses. There is no way fo
Java Interview Questions - Page 12
Question: What is Serialization and deserialization?
Answer: Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.
Java Interview Questions 3
Question: How many methods in the Serializable interface?
Answer:There is no method in the Serializable interface. The Serializable interface acts as a marker, telling the object serialization tools that your class is serializable.
Java Interview Questions - Page 4
Question: What are synchronized methods and synchronized statements?
Answer: Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's obj
Java Interview Questions - Page 2
Question: Parsers? DOM vs SAX parser
Answer: parsers are fundamental xml components, a bridge between XML documents and applications that process that XML. The parser is responsible for handling xml syntax, checking the contents of the document against c
Java Interview Questions - Page 5
Question: How to create multithread in a program?
Answer: You have two ways to do so. First, making your class "extends" Thread class. Second, making your class "implements" Runnable interface. Put jobs in a run() method and call start() method to start
Java Interview Questions - Page 8
Question: What is the purpose of the finally clause of a try-catch-finally statement?
Answer: The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.