Skip to Content
Learning Java by Building Android Games - Third Edition
book

Learning Java by Building Android Games - Third Edition

by John Horton
March 2021
Beginner to intermediate
686 pages
13h 6m
English
Packt Publishing
Content preview from Learning Java by Building Android Games - Third Edition

Chapter 3: Variables, Operators, and Expressions

We are going to make good progress in this chapter. We will learn about Java variables that allow us to give our game the data it needs. By doing this, things such as the sub's location and whether it has been hit will soon be possible to code. Furthermore, we will look at the use of operators and expressions, which will enable us to change and mathematically manipulate this data as the game is executing.

In this chapter, we will cover the following topics:

  • Handling syntax and jargon
  • Having a full discussion about Java variables, including types, references, primitives, declaration, initialization, casting, concatenation, and more
  • Practicing writing code to use and manipulate variables with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Java by Building Android Games - Second Edition

Learning Java by Building Android Games - Second Edition

John Horton
Programming Android with Kotlin

Programming Android with Kotlin

Pierre-Olivier Laurence, Amanda Hinchman-Dominguez, Mike Dunn, G. Blake Meike

Publisher Resources

ISBN: 9781800565869Supplemental Content