saravanan ragunathan wrote:why i have to intialize them to null eventhough i have
intialized them by returning the referneces through the
methods ...
If class.forName(driver); throws an exception then they won't have been initialised when they are referenced in the finally block.
If you do initialise them to null, then you will need to check that they are not null in the finally block