Summary

We used if, else, and switch to make decisions with expressions and branch our code. We saw and practiced while, for, and do while to repeat parts of our code. Then, we put it all together in two quick demo apps.

It doesn't matter if you don't remember everything straight away, as we will constantly be using these techniques and keywords throughout this book.

In the next chapter, we will take a much closer look at Java methods, which is where all our code will go.

Get Android Programming for Beginners - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.