import java.sql.*; public class Test { public static void main(String args[]) { Connection conn = null; try { Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection ("jdbc:mysql://localhost:3306/testdb", "root", "123"); System.out.println("db에 접속 완료"); conn.close(); } catch(ClassNotFoundException cnfe) { System.out.println("해당 클래스를 찾을 수 없습니다." + cnfe.getMessage()); } catch(SQ..