How come this program doesn't run?
Well.. not just this program, all my other ones.
There are no mistakes, I wrote the code as this textbook says but its not running and its giving this error (on dr java):
1 error found:
File: (no associated file) [line: (no source location)]
Error: No compiler is available.
The code looks like this:
public class TestDisk {
public static void main(String[] args) {
Disk saucer = new Disk(10, 0.02);
System.out.println("Disk radius: " + saucer.getRadius());
System.out.println("Disk surface area: " + saucer.area());
System.out.println("Disk volumn: " + saucer.volumn());
Disk plate1 = new Disk(12, 0.05);
Disk plate2 = new Disk(12, 0.07);
if (plate1.equals(plate2)) {
System.out.println("objects are equal ");
} else {
System.out.println("Objects are not equal ");
}
System.out.println(plate1);
System.out.println(plate2);
}
}
I saved it as Test.Disk