I am trying to insert data into MySQL and I'm getting an error:
cannot find symbol c
import java.sql.*;
class Insert{
public static void main(String args[]){
try{
Class.forName("com.jdbc.mysql.Driver");
Connection c = DriverManager.getConnection("jdbc:mysql://localhost:3036/db","ravi","ravi");
//showing error in the below statement at c
Statement stmt = c.CreateStatement();
int result=stmt.executeUpdate("Insert into emp values(3,'david',33) ");
System.out.println("success");
c.close();
} catch(Exception e) {
System.out.println(e);
}
}
}