Section One
Java Jumpstart
Project 1: The Repeater
Project
Type a message, press two buttons, and the computer will repeat it.
New building blocks
Classes, Statements, Variables
When first learning Java, there are four essential types of code to know: Comments, Statements, Declarations, and Flow Control.
Comments
Comments always begin with //
Compilers ignore comments.
They are only used so the programmer can document the code. The documentation lets you edit the code later with ease. Once the code increases to hundreds of lines long, it is extremely difficult to remember the function of each line. This will help.
Statements
These let you do things! Like printing to the screen …
They always end in semicolons.
Declarations
Declarations use ...
Get Programming Video Games for the Evil Genius 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.