- Learning Java by Building Android Games
- John Horton
- 181字
- 2021-08-06 19:16:20
Chapter 3. Speaking Java – Your First Game
In this chapter, we will start writing our very own Java code at the same time as we begin understanding Java syntax. We will learn how to store, retrieve, and manipulate different types of values stored in the memory. We will also look at making decisions and branching the flow of our code based on the values of this data.
In this order, we will:
- Learn some Java syntax and see how it is turned into a running app by the compiler
- Store data and use it with variables
- Learn how to express yourself in Java with expressions
- Continue with the math game by asking a question
- Learn about decisions in Java
- Continue with the math game by getting and checking the answer
Acquiring the preceding Java skills will enable us to build the next two phases of our math game. This game will be able to ask the player a question on multiplication, check the answer and give feedback based on the answer given, as shown in the following screenshot:

推薦閱讀
- 造個(gè)小程序:與微信一起干件正經(jīng)事兒
- JavaScript 網(wǎng)頁(yè)編程從入門到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開發(fā)視頻大講堂)
- 數(shù)據(jù)結(jié)構(gòu)(Java語(yǔ)言描述)
- Blockly創(chuàng)意趣味編程
- Go語(yǔ)言編程
- 編寫高質(zhì)量代碼:改善Objective-C程序的61個(gè)建議
- Red Hat Enterprise Linux Troubleshooting Guide
- Scala編程實(shí)戰(zhàn)
- 實(shí)戰(zhàn)Python網(wǎng)絡(luò)爬蟲
- Web前端測(cè)試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實(shí)踐
- Mastering XenApp?
- Zend Framework 2 Cookbook
- Manage Your SAP Projects with SAP Activate
- HTML5 and CSS3:Building Responsive Websites
- Elasticsearch實(shí)戰(zhàn)(第2版)