I'm using NetBeans to write the program. The program calculates the area of a circle
The code :
public class Pragnya {
public static void main(String[] args) {
int r = Integer.parseInt(args[0]);
double PI = 3.14;
double area = PI * r * r;
System.out.println("Area of circle is: "+area);
}
}
The error shown is :
Error: Could not find or load main class Pragnya
Caused by: java.lang.NoClassDefFoundError: pragnya/Pragnya (wrong name: Pragnya)
How do I resolve this?