Transcript Slide 1

02 Language Fundamentals
Agenda
• Fundamentals
• Operators
• Flow Controls
2
Outline
•
•
•
•
•
•
•
•
•
Java Source File Structure
Java Keywords
Identifiers
Literals
Variables and Data Types
Variable Declaration and Initialization
Operators
Primitive Casting
Flow Controls
3
Objectives
At the end of this section, you should be able to:
• Recognize and create correctly constructed source code
• Recognize and create correctly constructed declarations
• Distinguish between legal and illegal identifiers
• Describe all the primitive data types and the ranges of
the integral data types
• Recognize correctly formatted data types
• Learn to properly declare and initialize variables
• Understand the contents of the argument list of an
application’s main() method
4
Objectives (continued)
Operators:
• Learn to use:
•
•
•
•
•
•
•
Unary operators
Arithmetic operators
String operators
Relational operators
Conditional operators
Logical operators
Assignment operators
• Be familiar with object, shift and bitwise operators
• Identify the order of evaluation and change its precedence
• Learn how to cast primitive data types
5
Objectives (continued)
Flow Controls:
• Learn syntax and correct use of:
•
•
•
•
•
•
if-else() statement
switch() statement
while() statement
do-while() statement
for() statement
break, continue and label statements
• Introduce the concept of return statement
6
Java Source File Structure
declaration order
1. Package declaration
Used to organize a collection of
related classes.
2. Import statement
Used to reference classes and
declared in other packages.
3. Class declaration
A Java source file can have several
classes but only one public class is
allowed.
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
}
class Extra {
/*
* class body
*/
}
7
Java Source File Structure
Comments
1. Single Line Comment
// insert comments here
2. Block Comment
/*
* insert comments here
*/
3. Documentation Comment
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
/**
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
* insert documentation
*/
}
Whitespaces
Tabs and spaces are ignored by
the compiler. Used to improve
readability of code.
class Extra {
/*
* class body
*/
}
8
Java Source File Structure
Class
•Every java program includes at
least one class definition. The
class is the fundamental
component of all Java programs.
•A class definition contains all the
variables and methods that make
the program work. This is
contained in the class body
indicated by the opening and
closing braces.
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
}
class Extra {
/*
* class body
*/
}
9
Java Source File Structure
Braces
• Braces are used for grouping
statements or block of codes.
• The left brace ( { ) indicates
the beginning of a class body,
which contains any variables
and methods the class needs.
• The left brace also indicates
the beginning of a method
body.
• For every left brace that
opens a class or method you
need a corresponding right
brace ( } ) to close the class or
method.
• A right brace always closes
its nearest left brace.
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
}
class Extra {
/*
* class body
*/
}
10
Java Source File Structure
main() method
This line begins the main()
method. This is the line at which
the program will begin executing.
String args[]
Declares a parameter named
args, which is an array of String.
It represents command-line
arguments.
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
}
class Extra {
/*
* class body
*/
}
11
Java Source File Structure
Java statement
• A complete unit of work in a
Java program.
• A statement is always
terminated with a semicolon and
may span multiple lines in your
source code.
System.out.println()
This line outputs the string
“Welcome to Java!” followed by
a new line on the screen.
/*
* Created on Jul 14, 2005
*
* First Java Program
*/
package com.jds.sample;
import java.util.*;
/**
* @author JDS
*/
public class JavaMain {
public static void main(String[] args) {
// print a message
System.out.println("Welcome to Java!");
}
}
class Extra {
/*
* class bodyTerminating character
*/
}
Semicolon (;) is the terminating
character for any java statement.
12
Java Keywords
abstract
default
if
package
synchronized
assert
do
implements
private
this
boolean
double
import
protected
throw
break
else
instanceof
public
throws
byte
extends
int
return
transient
case
false
interface
short
true
catch
final
long
static
try
char
finally
native
strictfp
void
class
float
new
super
volatile
continue
for
null
switch
while
const
goto
13
Identifiers
•
•
•
•
•
An identifier is the name given by a
programmer to a variable, statement
label, method, class, and interface
An identifier must begin with a letter,
$ or _
Subsequent characters must be
letters, numbers, $ or _
An identifier must not be a Java
keyword
Identifiers are case-sensitive
Incorrect
3strikes
Correct
strikes3
Write&Print
Write_Print
switch
Switch
printMe is not the same as PrintMe
14
Literals
A literal is a representation of a value of a particular type
Type
Examples & Values
boolean
true false
character
’a’ ‘\uFFFF' ‘\777’
integer
123 123L O123 Ox123
floating-point
123.5 123.5D 123.5F 123.5e+6
object
“test” null
escape sequences \n \t \b \f \r \’ \” \\
15
Variable and Data Types
•
A variable is a named storage location used to represent
data that can be changed while the program is running
•
A data type determines the values that a variable can
contain and the operations that can be performed on it
•
Categories of data types:
1. Primitive data types
2. Reference data types
16
Primitive Data Types
• Primitive data types represent atomic values and are built-in to Java
• Java has 8 primitive data types
Type
Bits
Lowest Value
Highest Value
boolean
(n/a)
false
true
char
16
'\u0000' [0]
'\uffff' [216-1]
byte
8
-128 [-27]
+127 [27-1]
short
16
-32,768 [-215]
+32,767 [215-1]
int
32
-2,147,483,648 [-231]
+2,147,483,647 [231-1]
long
64
-9,223,372,036,854,775,808 [-263]
+9,223,372,036,854,775,807 [263-1]
float
32
±1.40129846432481707e-45
±3.40282346638528860e+38
double
64
±4.94065645841246544e-324
±1.79769313486231570e+308
17
Reference Data Types
•
Reference data types represent objects
•
A reference serves as a handle to the object, it is a
way to get to the object
•
Java has 2 reference data types
1. Class
2. Interface
18
Variable Declaration & Initialization
• Declaring a variable with primitive data type
int
age
=
primitive identifier
type
name
21;
initial
value
• Declaring a variable with reference data type
Date
String
reference
type
now = new Date();
name = “Jason”;
identifier initial
name
value
19
Primitive Type Declaration
declaration
MEMORY
allot space to memory
int age;
type
Identifier
name
age
1
07
initialization/assignment
age = 17;
Identifier value
name
stack
20
Reference Type Declaration
allot space to memory
Car myCar;
myCar
memory address
location
type
Identifier
name
reference
The heap
myCar = new Car(“Bumble Bee”);
Values
Identifier
name
Bumble Bee
Car object
21
Scope of Variable
Member Variables
Declared inside the class
but outside of all methods.
Accessible by all methods
of the class.
public class HelloWorld {
//accessible throughout the class
String name;
public void otherMethod(){
float salary = 15000.00f;
//can’t access age variable from here
}
Local Variables Available
only within the method
where they were declared.
Method parameters have
local scope.
public static void main(String args[ ]) {
//can’t access salary variable from here
int age=17;
//can’t access ctr variable from here
for (int ctr=0 ; ctr<5 ; ctr++) {
//age variable accessible here
}
}
}
22
Agenda
• Fundamentals
• Operators
• Flow Controls
23
Operators and Assignments
•
•
•
•
•
•
•
•
•
•
•
•
Unary operators
Arithmetic operators
String operator
Relational operators
Conditional operator
Logical operator
Assignment operators
Object operators
Shift operators
Bitwise operators
Evaluation order
Primitive Casting
24
Unary Operators
•
Unary operators use only one
operand
++
Increment by 1, can be prefix or postfix
--
Decrement by 1, can be prefix or postfix
+
Positive sign
-
Negative sign
Sample code:
int num=10;
System.out.println("incrementing/decrementing...");
System.out.println(++num);
System.out.println(--num);
System.out.println(num++);
System.out.println(num--);
Sample output:
incrementing/decrementing...
11
10
10
11
setting signs...
10
-10
System.out.println("setting signs...");
System.out.println(+num);
System.out.println(-num);
25
Arithmetic Operators
•
Arithmetic operators are used for basic
mathematical operations
Sample code:
int num1=15, num2=10;
System.out.println("calculating...");
System.out.println(num1 + num2);
System.out.println(num1 - num2);
System.out.println(num1 * num2);
System.out.println(num1 / num2);
System.out.println(num1 % num2);
+
Add
-
Subtract
*
Multiply
/
Divide
%
Modulo, remainder
Sample output:
calculating...
25
5
150
1
5
26
String Operator
•
•
String operator (+) is used to concatenate operands
If one operand is String, the other operands are converted to String
Sample code:
String fname = "Josephine", lname = "Santos", mi = "T";
String fullName = lname + ", " + fname + " " + mi + ".";
String nickName = "Jessy";
int age=21;
System.out.println("My full name is: " + fullName);
System.out.println("You can call me " + nickName + "!");
System.out.println("I'm " + age + " years old.");
Sample output:
My full name is: Santos, Josephine T.
You can call me Jessy!
I'm 21 years old.
27
Relational Operators
•
•
•
•
•
Relational operators are used to compare values
boolean values cannot be compared with non-boolean values
Only object references are checked for equality, and not their states
Objects cannot be compared with null
null is not the same as “”
<
<=
>
Less than
Less than or equal to
Greater than
>=
Greater than or equal to
==
Equals
!=
Not equals
28
Relational Operators
Sample code:
String name1 = "Marlon"; int weight1=140, height1=74;
String name2 = "Katie"; int weight2=124, height2=78;
boolean isLight = weight1 < weight2, isLightEq = weight1 <= weight2;
System.out.println("Is " + name1 + " lighter than " + name2 + "? " + isLight);
System.out.println("Is " + name1 + " lighter or same weight as " + name2 + "? " + isLightEq);
boolean isTall = height1 > height2, isTallEq = height1 >= height2;
System.out.println("Is " + name1 + " taller than " + name2 + "? " + isTall);
System.out.println("Is " + name1 + " taller or same height as " + name2 + "? " + isTallEq);
boolean isWeighEq = weight1 == weight2, isTallNotEq = height1 != height2;
System.out.println("Is " + name1 + " same weight as " + name2 + "? " + isWeighEq);
System.out.println("Is " + name1 + " not as tall as " + name2 + "? " + isTallNotEq);
System.out.println("So who is heavier?");
System.out.println("And who is taller?");
Sample output:
Is Marlon lighter than Katie? false
Is Marlon lighter or same weight as Katie? false
Is Marlon taller than Katie? false
Is Marlon taller or same height as Katie? false
Is Marlon same weight as Katie? false
Is Marlon not as tall as Katie? true
So who is heavier?
And who is taller?
29
Conditional operator
•
The ternary operator (?:) provides a handy way to code simple if-else()
statements in a single expression, it is also known as the conditional operator
•
•
If condition is true, then exp1 is returned as the result of operation
If condition is false, then exp2 is returned as the result of operation
•
Can be nested to accommodate chain of conditions
Syntax:
condition ? exp1 : exp2;
Sample code:
int yyyy=1981, mm=10, dd=22;
String mmm = mm==1?"Jan":mm==2?"Feb":mm==3?"Mar":mm==4?"Apr":mm==5?"May":mm==6?"Jun":
mm==7?"Jul":mm==8?"Aug":mm==9?"Sep":mm==10?"Oct":mm==11?"Nov":mm==12?"Dec":"Unknown";
System.out.println("I was born on " + mmm + " " + dd + ", " + yyyy);
Sample output:
I was born on Oct 22, 1981
30
Logical Operators
•
•
•
•
Logical operators are used to compare
boolean expressions
! inverts a boolean value
& | evaluate both operands
&& || evaluate operands conditionally
!
NOT
&
AND
|
OR
^
XOR
&&
Short-circuit AND
||
Short-circuit OR
Truth Table
Op1
Op2
!Op1
Op1 & Op2
Op1 | Op2
Op1 ^ Op2
Op1 && Op2
Op1 || Op2
false
false
true
false
false
false
false
false
false
true
true
false
true
true
false
true
true
false
false
false
true
true
false
true
true
true
false
true
true
false
true
true
31
Short-circuit Logical Operators (&&,|| and !)
• Similar to the Boolean operators, but with an added ability to
“short-circuit” part of the process, using a couple of mathematical
rules:
• If the left operand of an && operation is false, the result is
automatically false, and the right operand is not evaluated
false; && (8>5);
boolean a = (5>8)
• If the left operand of an || operation is true, the result is
automatically true, and the right operand is not evaluated
true; || (5>8);
boolean b = (8>5)
•
Boolean Complement ( ! ):
• The NOT function inverts the value of boolean
false;
boolean c = !b;
32
Logical Operators
Sample code:
Sample output:
Are you a candidate for promotion? true
int yrsService=8;
Will you be promoted as a regular employee? false
double perfRate=86;
Will you be promoted as a supervisor? false
double salary=23000;
Will you be promoted as a manager? true
char position='S';
Will you
be paid more
and work E-executive,
less? false T-top executive
// P-probationary R-regular,
S-supervisor,
M-manager,
I hope you won't be demoted, are you? false
boolean forRegular, forSupervisor, forManager, forExecutive, forTopExecutive;
forRegular = yrsService>1 & perfRate>80 & position=='P' & salary<10000;
forSupervisor = yrsService>5 & perfRate>85 & position=='R' & salary<15000;
forManager = yrsService>7 & perfRate>85 & position=='S' & salary<25000;
forExecutive = yrsService>10 & perfRate>80 & position=='M' & salary<50000;
forTopExecutive = yrsService>10 & perfRate>80 & position=='E' & salary<75000;
boolean isPromoted = forRegular||forSupervisor||forManager||forExecutive||forTopExecutive;
boolean isLuckyGuy = forExecutive ^ forTopExecutive;
System.out.println("Are you a candidate for promotion? " + isPromoted);
System.out.println("Will you be promoted as a regular employee? " + forRegular);
System.out.println("Will you be promoted as a supervisor? " + forSupervisor);
System.out.println("Will you be promoted as a manager? " + forManager);
System.out.println("Will you be paid more and work less? " + isLuckyGuy);
System.out.println("I hope you won't be demoted, are you? " + !isPromoted);
33
Assignment Operators
•
Sample code:
Assignment operators are
used to set the value of a
variable
=
Assign
+=
Add and assign
-=
Subtract and assign
*=
Multiply and assign
/=
Divide and assign
%=
Modulo and assign
&=
AND and assign
|=
OR and assign
^=
XOR and assign
double unitPrice=120, qty=2, salesAmount;
double discRate=15, discAmount, vatRate=10, vatAmount;
// compute gross sales
salesAmount = unitPrice * qty;
System.out.println("Gross Sales: " + salesAmount);
// compute tax
vatRate /= 100;
vatAmount = salesAmount * vatRate;
salesAmount += vatAmount;
System.out.println("Tax: " + vatAmount);
// compute discount
discRate /= 100;
discAmount = salesAmount * discRate;
salesAmount -= discAmount;
System.out.println("Discount: " + discAmount);
System.out.println("Please pay: " + salesAmount);
Sample output:
Gross Sales: 240.0
Tax: 24.0
Discount: 39.6
Please pay: 224.4
34
Casting
• Casting is converting from one data type to another
• Implicit casting is an implied casting operations
• Explicit casting is a required casting operations
• Primitive casting is converting a primitive data type to another
• Widening conversion is casting a narrower data type to a broader
data type
• Narrowing conversion is casting a broader data type to a narrower
data type
• Reference casting is converting a reference data type to another
• Upcasting is conversion up the inheritance hierarchy
• Downcasting is conversion down the inheritance hierarchy
• Casting between primitive and reference type is not allowed
• In Java, casting is implemented using () operator
35
Primitive Casting Flow
widening conversion
char
byte
short
int
long
float
doubl
e
narrowing conversion
36
Primitive Casting Rule
Operation
Conversion Type
arithmetic
implicit widening conversion
relational
implicit widening conversion
shift
implicit widening conversion
bitwise
implicit widening conversion
assignment
implicit widening conversion (if target is broader )
parameter passing
implicit widening conversion (if formal parameter is broader)
logical
none
ternary ?:
none
boolean
none
(all others)
explicit casting (narrowing or widening conversion)
37
Implementing Primitive Casting
public static void main(String args[]) {
short age = 20;
char sex = ‘M’;
byte iq = 80;
int height = 64;
long distance = 300;
float price = 99.99f;
double money = 500.00;
age = sex;
sex = iq;
iq = (byte) height;
distance = height;
price = money;
sex = (char) money;
//
//
//
//
//
//
will
will
will
will
will
will
this
this
this
this
this
this
compile?
compile?
compile?
compile?
compile?
compile?
}
38
Summary of Operators
Evaluation order of operators in Java is as follows:
• Unary (++ -- + - ~ ())
• Arithmetic (* / % + -)
• Shift (<< >> >>>)
• Comparison (< <= > >= instanceof == !=)
• Bitwise (& ^ |)
• Short-circuit (&& || !)
• Conditional (?:)
• Assignment (= += -= *= /=)
39
Agenda
• Fundamentals
• Operators
• Flow Controls
40
Flow Controls
•
•
•
•
•
•
•
if-else() statement
switch() statement
while() statement
do-while() statement
for() statement
break statement
continue statement
• Statement label
41
Types of Flow Control
1. Sequential
•
Perform statements in the order
they are written
2. Selection
•
Perform statements based on
condition
3. Iteration
•
Perform statements repeatedly
based on condition
42
if-else()
•
•
•
•
•
if-else() performs statements based on two conditions
Condition should result to a boolean expression
If condition is true, the statements following if are executed
If condition is false, the statements following else are executed
Can be nested to allow more conditions
Syntax:
Example:
Output:
if (condition) { // braces optional
// statement required
}
else {
// else clause is optional
// statement required
}
int age=10;
if (age < 10) {
System.out.println("You're just a kid.");
} else if (age < 20){
System.out.println("You're a teenager.");
} else {
System.out.println("You're probably old...");
}
You're a teenager.
43
switch()
•
•
•
•
switch() performs statements based on multiple conditions
exp can only be char byte short int, val should be a unique constant of exp
case statements falls through the next case unless a break is encountered
default is executed if none of the other cases match the exp
Syntax:
Example:
Output:
switch (exp) {
case val:
// statements here
case val:
// statements here
default:
// statements here
}
char sex='M';
switch (sex){
case 'M':
System.out.println("I'm a male."); break;
case 'F':
System.out.println("I'm a female."); break;
default:
System.out.println("I am what I am!");
}
I'm a male.
44
while()
• while() performs statements repeatedly while condition
remains true
Syntax:
Example:
Output:
while (condition) { // braces optional
// statements here
}
int ctr=10;
while (ctr > 0) {
System.out.println("Timer: " + ctr--);
}
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
10
9
8
7
6
5
4
3
2
1
45
do-while()
• do-while() performs statements repeatedly (at least once) while
condition remains true
Syntax:
Example:
Output:
do
// statements here
while (condition);
int ctr=0;
do
System.out.println("Timer: " + ctr++);
while (ctr < 10);
// next statement
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
Timer:
0
1
2
3
4
5
6
7
8
9
46
for()
•
•
•
•
•
for() performs statements repeatedly based on a condition
Init is a list of either declarations or expressions, evaluated first and only once
Condition is evaluated before each iteration
Exp is a list of expressions, evaluated after each iteration
All entries inside () are optional, for(;;) is an infinite loop
Syntax:
Example:
for (init; condition; exp) { // braces optional
// statements here
}
for (int age=18; age<30; age++) {
System.out.println("Enjoy life while you're " + age);
}
Output:
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
Enjoy
life
life
life
life
life
life
life
life
life
life
life
life
while
while
while
while
while
while
while
while
while
while
while
while
you're
you're
you're
you're
you're
you're
you're
you're
you're
you're
you're
you're
18
19
20
21
22
23
24
25
26
27
28
29
47
break
• break exits loops and switch() statements
Syntax:
Example:
break;
boolean isEating=true;
int moreFood=5;
while (isEating) {
if (moreFood<1) break;
System.out.println("Uhm, yum, yum...");
moreFood--;
}
System.out.println("Burp!");
Output:
Uhm, yum,
Uhm, yum,
Uhm, yum,
Uhm, yum,
Uhm, yum,
Burp!
yum...
yum...
yum...
yum...
yum...
48
continue
• continue is used inside loops to start a new iteration
Syntax:
Example:
Output:
continue;
for (int time=7; time<12; time++) {
if (time<10) {
System.out.println("Don't disturb! I'm studying...");
continue;
}
System.out.println("zzzZZZ...");
}
Don't disturb! I'm studying...
Don't disturb! I'm studying...
Don't disturb! I'm studying...
zzzZZZ...
zzzZZZ...
49
Statement Label
•
•
•
A label is an identifier placed before a statement, it ends with :
break labelName is used to exit any labelled statement
continue labelName is used inside loops to start a new iteration of the labeled loop
Syntax:
Example:
labelName:
break labelName;
continue labelName;
Output:
More practice...
Nice score! One clap!
Perfect score! More claps!!!
Perfect score! More claps!!!
Perfect score! More claps!!!
int[] scores = {3,9,10,0,8,10,7,1,9,8};
outer:
for (int i=0; i<10; i++) {
if (scores[i] <=0) break outer;
if (scores[i] > 5) {
inner:
for (int j=0; j<3; j++) {
if (scores[i] == 10){
System.out.println ("Perfect score! More claps!!!");
continue inner;
}
System.out.println ("Nice score! One clap!");
continue outer;
}
}
if (scores[i] <= 5) System.out.println("More practice...");
}
50
return
• return branching
statement is used to
exit from the current
method.
• Two forms:
• return <value>;
• return;
Example 1:
public int sum(int x, int y) {
return x + y;
}
Example 2:
public int sum(int x, int y) {
x = x + y;
if (x < 100){
return x;
}else{
return x + 5;
}
}
Example 2:
public void getSum(int x) {
System.out.println(x);
return;
}
51
Key Points
• A Java source file can include package, import and class
declarations in that order
• The main() method is the start of execution of a Java
application
• Each Java statement is terminated by a semicolon “;”
• Identifiers are case-sensitive
• Java keywords cannot be used as identifiers
• Each variable must be declared with a data type
• There are 8 primitive data types: boolean, char, byte,
short, int, long, float and double
• There are 3 reference data types: class, array and
interface
52
Key Points (continued)
• Use unary, arithmetic operators for basic mathematical
operations
• Use string operator to concatenate strings
• Use relational operators to compare objects
• Use conditional operator as alternative to if-else()
statement
• Use logical operators to compare boolean values
•
•
•
•
Use assignment operators to assign values to variables
Get familiar with object, shift and bitwise operators
Java evaluates operators in order of precedence
Casting is converting one data type to another
53
Key Points
• if() and switch() are used for branching statements
• while(), do-while() and for() are used for iterating
statements
• break, continue and label are used to branch inside
loops
54
Java Online Resources
•
•
•
•
•
•
•
•
•
•
•
•
•
•
http://www.java.sun.com
http://www.java.com
http://www.java.net
http://javaboutique.internet.com
http://javaboutique.webdeveloper.com
http://www.javaworld.com
http://www.developer.com
http://javalobby.org
http://freewarejava.com
http://onjava.com
http://javaranch.com
http://www.cafeaulait.org
http://www.java.about.com
http://www.javacoffeebreak.com
55
Java Online Resources
Tutorials:
• http://java.sun.com/docs/books/tutorial
• http://www.ibiblio.org/javafaq/javatutorial.html
• http://www.javacoffeebreak.com/tutorials/index.html
• http://www.cafeaulait.org/course/
• http://oopweb.com/Java/Documents/IntroToProgrammingUsingJav
a/VolumeFrames.html
FAQs:
• http://java.sun.com/products/jdk/faq.html
• http://www.ibiblio.org/javafaq/javafaq.html
• http://www.apl.jhu.edu/~hall/java/Beginners-Corner.html
• http://www.norvig.com/java-iaq.html
• http://www.jguru.com/faq/subtopics.jsp?topic=JavaLanguage
• http://www.javacoffeebreak.com/faq/
56