Advertisement
JudarnaDansar

Hata Java

May 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. //Method to add score to a student dorm
  2.     public void addScoreByOne(String studentDorm) {
  3.         try {
  4.             String question = "UPDATE elevhem SET huspoang = huspoang +1 WHERE elevhemsnamn='" + studentDorm + "'";
  5.             hwdb.update(question);
  6.  
  7.         } catch (InfException e) {
  8.             System.out.println("Felmeddelande" + e.getMessage());
  9.         }
  10.     }
  11.  
  12.     //Method to remove score from student dorm
  13.     public void removeScoreByOne(String studentDorm) {
  14.         try {
  15.             String question = "UPDATE elevhem SET huspoang = huspoang -1 WHERE elevhemsnamn='" + studentDorm + "'";
  16.             hwdb.update(question);
  17.  
  18.         } catch (InfException e) {
  19.             System.out.println("Felmeddelande" + e.getMessage());
  20.         }
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement