Simba49 0 Report post Posted June 10, 2007 I did the javac heater.java thing (I have tried different letter cases)Then I typed java Heater (using different cases again)I keep getting this error:Exception in thread "main" java.lang.NoSuchMethodError: main.This is the code, which basically follows the bicycle tutorial, I tried copying and pasting that, but still had the same problem. class Heater {int power = 0;int steam = 0;void changePower(int newValue) {power = newValue;}void changeSteam(int newValue) {steam = newValue;}void printStates() {System.out.println("power:"+power+" steam:"+steam);}}class Heater1 {public static void main(String[] args) {//create two heatersHeater heat1 = new Heater();Heater heat2 = new Heater();//methods for the two heatersheat1.changePower(3);heat1.changeSteam(20);heat1.printStates();heat2.changePower(1);heat2.changeSteam(3);heat2.printStates();}} BTW the tabs are where they should be. Notice from WeaponX: You MUST include the CODE tags whenever you are posting any kind of code, especially if they are chunks of code. Share this post Link to post Share on other sites