You're not missing a semi-colon, but the compiler does complain about a possible loss of precision when you use
int instead of
double for
pi, radius, diameter and friends.
After making that change, I got a clean compile on JDK 1.6.0:
Code:
Parsing Input...
Compiling...
Standard Output from javac:
[search path for source files: [.]]
[search path for class files: [/usr/local/java/jdk1.6.0/jre/lib/resources.jar, /usr/local/java/jdk1.6.0/jre/lib/rt.jar, /usr/local/java/jdk1.6.0/jre/lib/sunrsasign.jar, /usr/local/java/jdk1.6.0/jre/lib/jsse.jar, /usr/local/java/jdk1.6.0/jre/lib/jce.jar, /usr/local/java/jdk1.6.0/jre/lib/charsets.jar, /usr/local/java/jdk1.6.0/jre/classes, /usr/local/java/jdk1.6.0/jre/lib/ext/dnsns.jar, /usr/local/java/jdk1.6.0/jre/lib/ext/sunpkcs11.jar, /usr/local/java/jdk1.6.0/jre/lib/ext/sunjce_provider.jar, /usr/local/java/jdk1.6.0/jre/lib/ext/localedata.jar, .]]
[parsing started /tmp/15602/Circle.java]
[parsing completed 145ms]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/javax/swing/JOptionPane.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/String.class)]
[checking Circle]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/awt/Component.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/javax/swing/JComponent.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/awt/Container.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Integer.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Number.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/System.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Error.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/awt/HeadlessException.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/UnsupportedOperationException.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/RuntimeException.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Exception.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Throwable.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/NumberFormatException.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/IllegalArgumentException.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/StringBuilder.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/AbstractStringBuilder.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/CharSequence.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/io/Serializable.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/Comparable.class)]
[loading /usr/local/java/jdk1.6.0/lib/ct.sym(META-INF/sym/rt.jar/java/lang/StringBuffer.class)]
[wrote /tmp/15602/Circle.class]
[total 1705ms]
Output File(s)
Circle.class