I'm trying to assign integer values to letters and then use those letters to compute a simple equation. Here's what I have:
public class Math {
private int a = 53;
private int b = 40;
private int c = 36;
private int d = 12;
private int e = 27;
public Math() {
a = 53;
b = 40;
c = 36;
d = 12;
e = 27;
}
public void main(String[] args)
{
System.out.println(a + b + c + d + e);
}
}
It compiles fine, but then when I try to run it I get this:
java.lang.NoSuchMethodError: main
Exception in thread "main"
Process completed.
I have no idea why it won't run! =(