Java Reference
In-Depth Information
Getting Started
1
1.1 INTRODUCTION TO JAVA
2
Origins of the Java Language
1.3 THE CLASS
String
33
String Constants and Variables 33
Concatenation of Strings 34
Classes 35
String Methods 37
Escape Sequences 42
String Processing 43
The Unicode Character Set
★
2
Objects and Methods 3
Applets
4
A Sample Java Application Program 5
Byte-Code and the Java Virtual Machine 8
Class Loader
★
10
Compiling a Java Program or Class 10
Running a Java Program 11
★
★
43
1.4 PROGRAM STYLE
46
Naming Constants 46
Java Spelling Conventions 48
Comments 49
Indenting 50
1.2 EXPRESSIONS AND ASSIGNMENT
STATEMENTS
13
Identifiers 13
Variables 15
Assignment Statements 16
More Assignment Statements
★
19
Assignment Compatibility 20
Constants 21
Arithmetic Operators and Expressions 23
Parentheses and Precedence Rules
★
24
Integer and Floating-Point Division 26
Type Casting 29
Increment and Decrement Operators 30
Chapter Summary 51
Answers to Self-Test Exercises 52
Programming Projects 54