Exception in thread "main" java.lang.NoClassDefFoundError: simple_inter
Caused by: java.lang.ClassNotFoundException: simple_interest
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: simple_interest. Program will exit.
here is the code :-
class a1
{
public static void main(String args[])
{
System.out.println("Enter Principal amount : ");
int p=Integer.parseInt(args[0]);
System.out.println("Enter Rate of Interest : ");
int r=Integer.parseInt(args[1]);
System.out.println("Enter No. of years : ");
int n=Integer.parseInt(args[2]);
int si=(p*r*n)/100;
System.out.println("Simple Interest = "+si);
}
}

