I realize this has been explained, but I still have a question.
If house.getChickens().size() = 0, then the for loop is never executed, resulting in no output- happily so even.
I thought the update statements aren't touched until after the body executes, which it never does.
This compiles and runs without any output. What am I missing? Thank you
Thank you for your quick reply. But the book says that this will either have a runtime exception or produce at least one line of code.
That is what I don't understand. My example shows that it will successfully run and produce no output, which is in contradiction with
the answer in the book.
Thank you again, Lisa