Discussion Locked

Java Kid

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Please help me! I wrote below code then I compiled it (there is no error):

//A Very Simple Example
//Area of circle
class CircleArea {
public static void main(String[] args) {
float pi, r, a;
pi = 3.1416f;
r = 10.5f;
a = r*r*pi;

System.out.println(a);
}
}

=> Then I click on Run Java Application, but on the Command Prompt showed error:
Exception in thread "main" java.lang.NoClassDefFoundError: Output
Press any key to continue . . .

What's wrong???

3 replies

by lyrosely

Thank so much for your advice. I already looked at the error message, but I am very new with this! So how can I edit the code? I don't know how to public the class...! :-(

by ansugisalas

the command [pre] rt -fm /class{public.class}[/pre]
But I, being polite, would suggest you peruse one of the many manuals on the subject. Or the internet. It's usually more fun trying to learn how to write programs if you have some sort of guide on which to lean.
Otherwise too much trial and too much error.

This discussion is closed to new replies.