I have the impression that there's an overall problem with the indentation. In the following code, the indentation is not correct inside the for loop.
Here is the blueJ code hightlighter output code :
And the real code indentation :
public String getItemString() {
if (this.aMultipleItem.isEmpty()){
return "Il n'y a point d'objets intéressants à l'horizon.";
}
StringBuilder itemsString = new StringBuilder("Objets disponibles : ");
for (int i = 0; i < aMultipleItem.size(); i++) {
Item item = aMultipleItem.get(i);
itemsString.append(item.getName());
if (i != aMultipleItem.size() - 1) {
itemsString.append(", ");
}
}
return itemsString.toString();
} //getItemString()
I have the impression that there's an overall problem with the indentation. In the following code, the indentation is not correct inside the for loop.
Here is the blueJ code hightlighter output code :
And the real code indentation :