Short Core Java Interview Questions ?
1. Primitive data types are passed by reference or pass by value ? Ans. Primitive data types are passed by value. 2. How to create custom exceptions ? Ans. Your... Read more »
1. Primitive data types are passed by reference or pass by value ? Ans. Primitive data types are passed by value. 2. How to create custom exceptions ? Ans. Your... Read more »
The basic difference between a Vector and an ArrayList is that, vector is synchronized while ArrayList is not. Thus whenever there is a possibility of multiple threads... Read more »
An enumeration is an interface containing methods for accessing the underlying data structure from which the enumeration is obtained. It is a construct which collection... Read more »
The size is the number of elements actually stored in the vector, while capacity is the maximum number of elements it can store at a given instance of time. Read more »
When an exception is thrown within the body of a try statement, the catch clauses of the try statement are examined in the order in which they appear. The first... Read more »
While making a JDBC connection we go through the following steps : Step 1 : Register the database driver by using : Class.forName(\” driver classs for that... Read more »
At this point in time applets may communicate with other applets running in the same virtual machine. If the applets are of the same class, they can communicate... Read more »
No in this case the finally block will not execute because when you say System.exit (0); the control immediately goes out of the program, and thus finally never... Read more »
In the first approach as a programmer of the method, you urself are dealing with the exception. This is fine if you are in a best position to decide should be done... Read more »
One can not do anytihng in this scenarion. Because Java does not allow multiple inheritance and does not provide any exception interface as well. Read more »
One can not do anytihng in this scenarion. Because Java does not allow multiple inheritance and does not provide any exception interface as well. Read more »
The class should extend from Exception class. Or you can extend your class from some more precise exception type also. Read more »
It is sometimes easier to deal with primitives as objects. Moreover most of the collection classes store objects and not primitive data types. And also the wrapper... Read more »
Yes the static fields do get serialized. If the static field is an object then it must have implemented Serializable interface. The static fields are serialized... Read more »
Java only supports pass by value. With objects, the object reference itself is passed by value and so both the original reference and parameter copy both refer to... Read more »