Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 4th, 2013  |  syntax: None  |  size: 0.58 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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;
clone this paste RAW Paste Data