
Untitled
By: a guest on
Jan 4th, 2013 | syntax:
None | size: 0.58 KB | hits: 22 | expires: Never
Description Resource Path Location Type
The local variable total may not have been initialized Repository.java /proj_individual/src/repo line 35 Java Problem
public int foo(){
int total;
for(... : ...){
total += 1; // complains
}
return total;// complains
}
public int getLocatars(){
int total;
for ( Map.Entry<Apartment, List<Expense>> entry : dic.entrySet() ) {
if(entry.getKey().isDebt()){
total += entry.getKey().getNrProple();
}
}
return total;
}
int total = 0;
int total;
int total = 0;