English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

public static void main(String args[]) throws IOException
{

BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

double number = Double.parseDouble(stdin.readLine());

if (number == 1)
{
//Opens another (module/class)(not sure which one) here
}

Hi! The purpose of this is to create a main menu which when the user inputs on the keyboard 1,2,3,4... calls (modules/classes not sure which one) like to view employees, or searching, or deleting etc.

I would like to know if someone could advise me on the code that calls a module/class. Thanks in advance

2007-03-24 22:32:28 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

lets say the class u want to call is classx, u ll then use the following code:
classx c= new classx( );

2007-03-24 22:55:58 · answer #1 · answered by abd 5 · 0 0

if you just want to call classes:

Classname test = new Classname();

if you want to call the method in the class
Classname test = new Classname();
test.method1();

or if the method / class is a static one
Classname.method1();

2007-03-26 02:58:51 · answer #2 · answered by Liviawarty J 2 · 0 0

try http://myjava.batcave.net

2007-03-25 06:27:10 · answer #3 · answered by Eranga D 2 · 0 0

fedest.com, questions and answers