T
Tuurbo46
Hi
Im currently experiencing some problems in getting the structure correct to
enable a user to select between menus.
I have chosen to create this menu in main and then allow all flow to other
classes from here. Is this considered the correct way of doing this?
Currently my version frows errors, saying there is to many brackets. I have
looked at it for a long time and i cannot see a problem. I have added this
code below
Hope somebody can point me in the right direction.
Tuurbo
############################################
public static void main(String args[]) {
public void mainMenu(void)
int tempMyoption;
do {
tempMenuScreen();
tempMyoption = readInOption();
switch (tempMyoption) {
case '1':
System.out.println("one is working");
break;
case '2':
Systme.out.println("two is woriking");
break;
}
}
}
public void tempMenuScreen(void)
{
System.out.println("");
System.out.println("\t ### MAIN MENU ###");
System.out.println("\t 1) Add new motorbike");
System.out.println("\t 2) Exit");
}
}
Im currently experiencing some problems in getting the structure correct to
enable a user to select between menus.
I have chosen to create this menu in main and then allow all flow to other
classes from here. Is this considered the correct way of doing this?
Currently my version frows errors, saying there is to many brackets. I have
looked at it for a long time and i cannot see a problem. I have added this
code below
Hope somebody can point me in the right direction.
Tuurbo
############################################
public static void main(String args[]) {
public void mainMenu(void)
int tempMyoption;
do {
tempMenuScreen();
tempMyoption = readInOption();
switch (tempMyoption) {
case '1':
System.out.println("one is working");
break;
case '2':
Systme.out.println("two is woriking");
break;
}
}
}
public void tempMenuScreen(void)
{
System.out.println("");
System.out.println("\t ### MAIN MENU ###");
System.out.println("\t 1) Add new motorbike");
System.out.println("\t 2) Exit");
}
}