</P> <p> Import Java. SQL. *; <br/> Import javax. resource. CCI. resultset; </P> <p> public class temp {<br/> Public static void main (string [] ARGs) throws exception {<br/>/* class. forname ("org. gjt. mm. mySQL. driver "). newinstance (); <br/> string url = "JDBC: mysql: // localhost/test? User = root & Password = Hugh & useunicode = true & characterencoding = UTF-8 "; */</P> <p> class. forname ("com. mySQL. JDBC. driver "). newinstance (); <br/> string url = "JDBC: mysql: // localhost: 3306/test? User = root & Password = Hugh "; </P> <p> connection conn = drivermanager. getconnection (URL); <br/> statement stmt = Conn. createstatement (resultset. type_scroll_sensitive, resultset. concur_updatable); <br/> string SQL = "select * from student"; <br/> JAVA. SQL. resultset rs1_stmt.exe cutequery (SQL); <br/> while (RS. next () {<br/> system. out. println ("the first field content is:" + Rs. getstring (1); <br/> system. out. println ("the first field content is:" + Rs. getstring (2); <br/>}< br/> system. out. print ("succeeded in database operation, congratulations"); <br/> Rs. close (); <br/> stmt. close (); <br/> Conn. close (); <br/>}< br/>