摘要:
import java.sql.SQLException;import java.sql.Savepoint;import java.sql.Statement;public class SavePoint {/** * @param args * @throws ClassNotFoundException * @throws SQLException */public static voi... 阅读全文
摘要:
两种异常,checked 和 unchecked。 checked要求客户必须用try catch进行捕捉或者再次抛出,这是强制的。unchecked没有这个要求。checked 异常继承于Exception类。unchecked 异常继承于RuntimeException类。 阅读全文
摘要:
public static JdbcMySqlUtil getJdbcUtil() throws IOException,InstantiationException, IllegalAccessException,ClassNotFoundException {Properties prop = new Properties();InputStream is = new FileInputStr... 阅读全文
摘要:
package jdbc.test;import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutp... 阅读全文
摘要:
package jdbc.test;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.FileWriter;import java.i... 阅读全文
摘要:
package jdbc.test;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.Date;public class DateManapulate {public static in... 阅读全文
摘要:
package jdbc.test;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;public fin... 阅读全文