CS 111A Lecture Notes - Simple I/O in Java - Chapter 2 part 1

Console Output

Identifiers

Variables

Echo.java: Here is an example demonstrating the use of variables, and of the Scanner class for console input.

In-class exercise: input user's first name, then last name, and store them into two separate variables. Output them in reverse order with a comma between them.

Names.java: Solution to above exercise

Programming Style

Using dialog boxes for input and output

Return to CS 111A page