Lesson 21. Writing a Game with Java

Reading the source of a well-written program can be an educational experience. Software developers express themselves through the code they write. Aspiring programmers can learn a lot by reading between the lines.

This final lesson is built on the premise that programming subjects can be taught with the source code of functional, useful programs as the starting point. Read the code; read the story of how it was written; write your own. That’s the opposite order from the rest of this book and most others that teach programming languages. The typical approach is to introduce a subject, describe a few short examples, and then put it all together in a program that demonstrates the feature. Taking a code-first ...

Get Sams Teach Yourself Java in 21 Days (Covers Java 11/12), 8th 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.