Can we use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") inside non static function?

Showing Answers 1 - 1 of 1 Answers

Ofcourse why not, you can use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
inside non static function.  But I will suggest you should use this inside
static block. The reason is we put this in the static block is that we only have
to load the driver once.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions