Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package database;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.sql.Statement;
- /*
- * @author nitish
- */
- public class Database {
- public static void main(String[] args) {
- // TODO code application logic here
- try{
- Class.forName("com.mysql.jdbc.Driver");
- Connection con=DriverManager.getConnection(
- "jdbc:mysql://localhost:3306/nitish","root","");
- Statement stmt=con.createStatement();
- System.out.println("Connectede Successfully");
- }catch( ClassNotFoundException | SQLException e){
- System.out.println(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement