Chapter 13: Java Part I
pages 1 - 39
Background
- Developed by Sun Microsystems
- Platform Independent/Architecturally Neutral
- Based on Bytecode
- Object Oriented
- This material should be a review for everyone. In Chapter 14,
we will study applets. Applets are directly relevant
to web programming.
Comments
- Single Line
- Multiple Line
- Javadoc
Primitive Data Types
- boolean
- byte
- char (escape sequences: '\n' '\‘' '\\', etc.)
- double
- float, e.g. 3.14F
- int
- long, e.g. 1123L
- short
Arithmetic Operators
Comparison Operators
JOptionPane
Conditional Statements
Iterative Statements
Methods
Classes
Constructor Default Values
- numeric fields: 0
- character fields: '\u0000'
- boolean fields: false
- Object fields: null
Exercises
- Be able to explain the following four Java keywords:
native, strictfp, transient and volatile.
- Write a simple Hello World Java program. Demo it both
from an IDE (such as BlueJ) and from the command line (through the
use of javac and java).