01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
package basics.objectclass;
// A static class
public class Main2 {
  private Main2() {}
  static public void main (String[] args) {
    //stdlib.Trace.graphvizShowSteps (true); stdlib.Trace.run ();
    System.out.println(new Circle2 (1));
  }
}
// An object class
final class Circle2 extends Object {
  int radius;
  public Circle2(int radius) { this.radius = radius; }
  public String toString() { return "Circle(" + radius + ")"; }
}