37. What is Externalizable interface? Externalizable is an interface which contains two methods readExternal and writeExternal. These methods give you a control over the serialization mechanism. Thus if your class …
Interview Questions and Answers
- Interview Questions and AnswersJava ProgrammingTechnical Interview Questions and Answers
- Interview Questions and AnswersJava ProgrammingTechnical Interview Questions and Answers
Java Basics Interview Questions and Answers For Freshers and Experience Part-5
by Sby S31. Primitive data types are passed by reference or pass by value? Primitive data types are passed by value. 32. Objects are passed by value or by reference? Java only …
- Interview Questions and AnswersJava ProgrammingTechnical Interview Questions and Answers
Java Basics Interview Questions and Answers For Freshers and Experience Part-4
by Sby S25. Does importing a package imports the subpackages as well? Example: Does importing com.MyTest.* also import com.MyTest.UnitTests.*? No you will have to import the subpackages explicitly. Importing com.MyTest.* will import …
- Interview Questions and AnswersJava ProgrammingTechnical Interview Questions and Answers
Java Basics Interview Questions and Answers For Freshers and Experience Part-3
by Sby S19. Can an application have multiple classes having main() method? Yes it is possible. While starting the application we mention the class name to be run. The JVM will look …
- Interview Questions and AnswersJava ProgrammingTechnical Interview Questions and Answers
Java Basics Interview Questions and Answers For Freshers and Experience Part-2
by Sby S13. What if I write static public void instead of public static void? Program compiles and runs properly. 14. What if I do not provide the String array as the …
- Interview Questions and AnswersJavaTechnical Interview Questions and Answers
Core Java Interview Questions and Answers For Freshers and Experience Part-22
by Sby S27. How does Java handle integer overflows and underflows? It uses those low order bytes of the result that can fit into the size of the type allowed by the …
- Interview Questions and AnswersJavaTechnical Interview Questions and Answers
Core Java Interview Questions and Answers For Freshers and Experience Part-21
by Sby S121. To what value is a variable of the String type automatically initialized? The default value of an String type is null. 122. What is the difference between a field …
- Interview Questions and AnswersJavaTechnical Interview Questions and Answers
Core Java Interview Questions and Answers For Freshers and Experience Part-20
by Sby S115. What is constructor chaining and how is it achieved in Java ? A child object constructor always first needs to construct its parent (which in turn calls its parent …
- Interview Questions and AnswersJavaTechnical Interview Questions and Answers
Core Java Interview Questions and Answers For Freshers and Experience Part-19
by Sby S109. What is the difference between an if statement and a switch statement? The if statement is used to select among two alternatives. It uses a boolean expression to decide …
- Interview Questions and AnswersJavaTechnical Interview Questions and Answers
Core Java Interview Questions and Answers For Freshers and Experience Part-18
by Sby S103. What is the difference between a public and a non-public class? A public class may be accessed outside of its package. A non-public class may not be accessed outside …