Guest User

Untitled

a guest
Jan 4th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Description Resource Path Location Type
  2. The local variable total may not have been initialized Repository.java /proj_individual/src/repo line 35 Java Problem
  3.  
  4. public int foo(){
  5. int total;
  6. for(... : ...){
  7. total += 1; // complains
  8. }
  9. return total;// complains
  10. }
  11.  
  12. public int getLocatars(){
  13. int total;
  14. for ( Map.Entry<Apartment, List<Expense>> entry : dic.entrySet() ) {
  15. if(entry.getKey().isDebt()){
  16. total += entry.getKey().getNrProple();
  17. }
  18. }
  19. return total;
  20. }
  21.  
  22. int total = 0;
  23.  
  24. int total;
  25.  
  26. int total = 0;
Add Comment
Please, Sign In to add comment