Q1. What is garbage collection? can it be forced?
Ans. In java deallocation is handled automatically.When there is no reference to an object exists, it means the object is no longer needed then the object is destroyed automatically is called garbage collection.Garbage collection only occurs sporadically.There is a method exists ie System.gc for garbage collection.But we can not force for the garbage collection.

Q2.
How do you know that where to use abstract class or interface?
Ans. If we want to implement all the methods in a child class then we will go for Interface and if we want to implement a few methods , if we want to use a few methods of its super class we go for Abstract class.

Q3.
How are this() and super() used with constructors?
Ans. this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.

Q4.
Which Collection class is used for FIFO in Java
Ans. java.util.Concurrent ( Queues)

Q5.
How can we make objects of connection when connection is an interface.e.g. Connection conn = DriverManager.getConnection?
Ans. when our application executes connection con=DriverManager.getconnection(..);the internal code of getconnection()calls the connect method available in the driver class,the code in the driver class connects to the database,sends the username and pwd an object will be created based on a class that provides the implementation of connection interface.

Q6.
Is the JDBC-ODBC bridge multithreaded ?
Ans. True! The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won`t get the advantages of multi-threading.

Q7.
What’s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?
Ans. A result set that is TYPE_SCROLL_INSENSITIVE does not reflect changes made while it is still open and one that is TYPE_SCROLL_SENSITIVE does.