Selamat Hari Raya
public static void main(String[] kesalahan){Connection con = DBConnection.getConnection();
Statement stmtA = con.createStatement();
Statement stmtB = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT kesalahan from DOSA a WHERE a.date > (rayaTahunLepas)")
while(rs.next()){
System.out.println("Saya mintak maaf atas kesalahan "+rs.getString("kesalahan")+" saya yg dulu");
boolean dimaafkan = stmtB.executeUpdate("DELETE from DOSA WHERE kesalahan = '"+rs.getString("kesalahan")+"'");
if(dimaafkan){
System.out.println("Terima Kasih");
}else{
System.out.println("Sempena bulan baik ni bermaaf-maafan la. Tanak maaf ko punya pasal la...");