Unit 2 · 3 lessons
Programming Basics
The shape of a Java program, the variables that hold its data, and the operators and input that make it do something.
- 35 practice questions
- 30 flashcards
Lessons
- 1Your First Java ProgramEvery Java program starts from the same skeleton. Learn what each word in that skeleton does, how to compile and run it, and how to tell the three kinds of error apart.11 questions
- 2Variables, Primitive Types and CastingDeclaring named storage, choosing the right type for the job, and controlling what happens when types meet — including why 5 / 2 is 2.12 questions
- 3Operators, Expressions and InputHow Java evaluates an expression, what
+does to Strings, the Math methods worth knowing, and how to read typed input with Scanner without falling into the newline trap.12 questions