public void delete() {
		Connection conn = null;
		PreparedStatement pstmt = null;
		
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://localhost:3306/rock?user=root&password=123456";
			conn = DriverManager.getConnection(url);
			String sql = "delete from emp2 where ename=?";
			pstmt = conn.prepareStatement(sql);
			pstmt.setString(1, "rock3");
			pstmt.execute();
			System.out.println("delete!");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				if(null !=pstmt) {						
					pstmt.close();
				}
				if(null !=conn) {						
					conn.close();
				}
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}	
	}