Jeff Verdegan wrote:And just to add a bit more detail to what Bear is saying, it's important to understand that return has two roles:
1) To cease execution of the current method or constructor and trasfer control back to the caller. It always does this.
2) To specify the result value of the method. It only does this for methods that have non-void return types.
from what you said i understand that if the condition is met it wont excute line 24 which is items.add(item) ;
why didnt he use if - else instead of return ; ?