77 //todo: iban uzunlugunun kontrol edilmesi gerekli
78 if(IBAN.length()!=24) return false;
79
80 double depositSender, depositReceiver; 81 String temp = SqlQuery.StringGetSQL("SELECT deposit FROM clients WHERE id=" + id, "deposit");
82 depositSender = stringToDouble(temp);
83 depositSender = depositSender - amount;
105
106
107 public static boolean payOffDebt(String id, double amount) {
108 double deposit, debt;109 String temp = SqlQuery.StringGetSQL("SELECT debt FROM clients WHERE id=" + id, "debt");
110 debt = stringToDouble(temp);
111 temp = SqlQuery.StringGetSQL("SELECT deposit FROM clients WHERE id=" + id, "deposit");
Multiple variables (or fields) should not be declared on the same line.
Declaring more than one variables (or fields) on the same line makes the code harder to read. Things might get more confusing if some of those variables are initiliazed and some of them are not.
class Klass {
private int a, b = 20;
private void method() {
double d1, d2 = 3.5, d3;
// ... rest of the code
}
}
Consider declaring one variable per line.
class Klass {
private int a;
private int b = 20;
private void method() {
double d1;
double d2 = 3.5;
double d3;
// ... rest of the code
}
}