Tuesday, April 24, 2007

Expressions

A running program should be able to do calculations, much like a calculator. For example:

public class Main {
    public static void main(String[] args) {
        System.out.println(2 + 2 + 2);
    }
}

A calculation that produces a value, such as 6 * 9, is called an expression.

No comments: