- Learning Java by Building Android Games
- John Horton
- 117字
- 2021-07-23 19:02:27
Summary
In this chapter, we quickly got to grips with loops including while
loops, do
-while
loops and for
loops. Loops are part of Java's control flow. Finally, we used our knowledge of for
loops to draw the grid lines for the Sub' Hunter game. Also, if you were wondering why we didn't use all of the new operators we will use some more of them in the next chapter.
We will see more control flow options in the next chapter one of which (if
) we just had a quick look at. This time we will see how to branch execution of our code and once we have learned this we will be able to finish the game.