Thread: Integer Usage
View Single Post
  #1 (permalink)  
Old 01-23-2008, 06:02 AM
bluegreen7hi bluegreen7hi is offline
Member
 
Join Date: Nov 2007
Posts: 12
bluegreen7hi is on a distinguished road
Integer Usage
I'm trying to assign integer values to letters and then use those letters to compute a simple equation. Here's what I have:
Code:
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! =(
Reply With Quote
Sponsored Links