What is wrong with the code there are lots of error while debugging. I am writing a code for a singleton class to connect with the database mysql.
Here is my code
JDBC API mostly consists of interfaces which work independently of any database. A database specific driver is required for each database which implements the JDBC API.
First download the MySQL connector jar from www.mysql.com, then:
Right Click the project -- > build path -- > configure build path
In the libraries tab press Add External Jar
and select your jar.