Thread error in Java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sonia_Lady
Posted On:   Monday, May 17, 2004 10:23 AM

Hi I'm very new to Java and am trying to start my Main Class for a banking system. Thought I would start with the menu and see if these displayed OK. It seems to compile but I then get the following error in the DOS window: Exception in thread "main" java.lang.NoSuchMethodError: main Press any key to continue . . . Any ideas? My code is: import java.io.*; //import Text.java; public class Loadsamoneybank { private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); // PRE TRUE // POST Prints out menu public static void Main_menu() { System.out.println("*Loadsamoney Bank    More>>

Hi I'm very new to Java and am trying to start my Main Class for a banking system. Thought I would start with the menu and see if these displayed OK. It seems to compile but I then get the following error in the DOS window:


Exception in thread "main" java.lang.NoSuchMethodError: main Press any key to continue . . .


Any ideas?


My code is:

			
import java.io.*;
//import Text.java;
public class Loadsamoneybank {

private static BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));

// PRE TRUE
// POST Prints out menu
public static void Main_menu() {
System.out.println("*Loadsamoney Bank Menu*");
System.out.println("(1) Create new account");
System.out.println("(2) Delete an account");
System.out.println("(3) Make a deposit on an account");
System.out.println("(4) Make a withdrawal from an account");
System.out.println("(5) Increment the day count on an account");
System.out.println("(6) Change one of the interest rates");
System.out.println("(7) Change the Agreed Overdraft on a current account");
System.out.println("(8) Print to screen the description and index number of all the accounts");

System.out.println("(99) Display the menu to the screen");
System.out.println("(0) Exit");
}


I have another query as well if that is OK?! How do I then set the above so that if the reader selects 1 - that action is carried out etc.... Thanks for any help! Sonia    <<Less

Re: Thread error in Java

Posted By:   David_Thornton  
Posted On:   Monday, May 17, 2004 04:26 PM

See Sean's answer to this same question in the JavaLanguage
Forum.
About | Sitemap | Contact