http://java.sun.com/
http://java.sun.com/javase/6/docs/
http://java.sun.com/javase/6/docs/api/
http://java.sun.com/docs/books/tutorial/index.html
System.out.println(...);
Picture.java
import javax.swing.*;
JOptionPane.showMessageDialog(null, "It's a beautiful day!");
String
int
double
float
char
System.out.print()
System.out.println()
Circle.java
. . . private void draw() { if(isVisible) {
System.out.print();
...
System.out.println();
"
+
-
*
/
7 + 6 - 4 * 5 / 2
Math.SOMETHING
Math.sqrt(196)
Math.sin(3)
Math.PI
Math.pow(x,y)
Math.pow(3,2)
Math.pow(5,6)
labclasses
LabClass.java
printList()
System.out.println("Lab class " + timeAndDay);
System.out.println("Instructor: " + instructor + " room: " + room);
System.out.println("color is \"" + color + '"');
System.out.println("Welcome to the Picture Drawing Program, which is a really nice demonstration of graphics and object-oriented programming."); System.out.println("Welcome to the Picture Drawing Program, " + "which is a really nice demonstration of graphics " + "and object-oriented programming.");
.length()
.indexOf(...)
color.indexOf('e')
color.indexOf('r')
.substring(beginIndex, limitIndex)
beginIndex
limitIndex
color
"green"
color.substring(2,5)
color.substring(1,3)
Circle.moveVertical(...)
Square.makeVisible()
void
class Circle
Picture.draw()
System.out.println("initially, sun's color: " + );
TicketMachine
if ( condition ) { statements } else { statements }
if ( x < y ) { System.out.println("The winner is " + x); } else { System.out.println("The winner is " + y); }
<
>
<=
>=
==
!=