- using library classes
- reading documentation
- writing documentation

Alberto Ferrari
Ingegneria dell'Informazione, UniPR
String Str1 = new String(" Object Oriented Programming in Java ");
String Str2 = Str1.trim();
import java.util.Random;
...
Random randomGenerator;
randomGenerator = new Random();
int randomNumber = randomGenerator.nextInt();
System.out.println(randomNumber);
HashMap<String, String> phoneBook = new HashMap<String, String>();
phoneBook.put("Alberto Ferrari", "0521-1234567");
phoneBook.put("Giacomo Brambilla", "0521-7654321");
String number = phoneBook.get("Alberto Ferrari");
System.out.println(number);
import java.util.HashSet;
...
HashSet<String> mySet = new HashSet<String>();
mySet.add("one");
mySet.add("two");
mySet.add("three")
/**
This is a javadoc comment.
*/
public class BouncingBall {
private static final int GRAVITY = 3;
...
}

private final int SIZE = 10;
Alberto Ferrari
Ingegneria dell'Informazione, UniPR
www.ce.unipr.it/~aferrari/