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