Murach's Beginning Java 2, SDK 1.4
This chapter shows how to write a complete Java application that uses comments, primitive data types, variables, strings, dialog boxes, if statements, and a while loop.
To see how well this chapter works, you can
download this chapter for free.
|
|
|
|
How to code comments |
36 |
|
How to code statements |
36 |
|
How to create identifiers |
38 |
|
How to declare a class |
40 |
|
How to declare a main method |
42 |
|
|
The eight primitive data types |
44 |
|
How to initialize variables |
46 |
|
How to initialize constants |
46 |
|
How to code assignment statements |
48 |
|
How to code arithmetic expressions |
50 |
|
|
How to use the String class to create a String
object |
52 |
|
How to use two methods of the String class |
54 |
|
How to join two or more strings |
54 |
|
How to use the Integer and Double classes |
56 |
|
How to use two methods of the System.out object to print data to the console |
58 |
|
|
How to import classes |
62 |
|
How to use the JOptionPane class to get input |
64 |
|
How to use the System.exit method to end a JOptionPane thread |
64 |
|
How to use two more methods of the JOptionPane class |
66 |
|
|
How to code conditional expressions |
68 |
|
How to code if/else statements |
70 |
|
How to code while statements |
72 |
|
|
The dialog boxes for the application |
74 |
|
The code for the application |
74 |
|
|
t |
|
|
|
|
© Copyright 1998-2008 Mike Murach &
Associates, Inc. All rights reserved.
|