[CHAPTER 2]
Constructor
set up the object instance
Overload
several constructors exists in the same class
Request Class to perform method()
Identifer
A name for a variable, method, or class
No begin with a digit
No contain any spaces/
Case-sensitive
Initializer
the initial value defining a veriable
Access specifier
Data type
Variable name
Access specifier
Method type
Method name
Optional parameters
Two way to terminate a method
{
Return ;
void
indicates that this method does not return any results when
it completes its task.
[CHAPTER 3]
Promotion rules
When two different types are involved in an expression, the smaller
type (fewer bits) is promoted to the larger type before expression
is evaluated.
Arithmetic Operators
Numeric Operators Precedence
Prefix Increment /Decrement Operator
[CHAPTER 4]
innermost enclosing loop
import.java.io.*;
(x = getInt;)
public static int getInt() throws IOException
{
BufferedReader keyborad =
new BufferedRead(new InputStreamReader(System.in));
String input = keyboard.readLine();
return(Integer.parseInt(input));
}
[CHAPTER 5]
The same reference variable is now used to reference another object
instance
we have use "this" reference to explicity refer to the instance
variables
protected void finalize(){
}
object = null;
System.gc();
[Tutorial 4]
e.getActionCommand
returns the string inside the text field
or caption of a label
e.getSource
return the object reference that caused the event.
[CHAPTER 6]
.length()
.CharAt(int index)
.equals(string str)
.equalsIgnoreCase(string str)
.compareTo(string str)
.regionMatches(int toffset,String other,int ooffset,int len)
.indexOf(char c,int fromIndex) || forward
.lastIndexOf(char c,int fromIndex) || backward
.subString(int beginIndex,int endIndex)
.concat(String str)
.toUpperCase()
.toLowerCase()
.replace(char oldChar, char newChar)
.trim()
STRINGBUFFER
.ensureCapacity(int minimumCapacity)
.length()
.capacity()
.setLength()
.setCharAt(int index,char newChar)
.reverse()
.inset(int index, char newChar)
.deleteCharAt(int index)
               (
geocities.com/hk)