001package basics.objectclass; 002// A static class 003public class Main1 { 004 private Main1() {} 005 static public void main (String[] args) { 006 //stdlib.Trace.graphvizShowSteps (true); stdlib.Trace.run (); 007 Circle1 c = new Circle1(1); 008 String s = ((c==null) ? "null" : c.toString()); 009 System.out.println(s); 010 } 011} 012// An object class 013final class Circle1 extends Object { 014 final int radius; 015 public Circle1(int radius) { super(); this.radius = radius; } 016 public String toString() { return "Circle(" + radius + ")"; } 017}