java - Can I use "return" in here or any ideas? -
i'm new java , of knowledge self- taught. can me figure out this. our teacher wants make menu java. output this.. menu 1 - java history 2- java keywords 3 - java arrays , on. . do want read 1 (yes/no): //if yes please enter menu number: // display information.. //my problem how can connect new entered value first method don't have write on again... this whats on mind.. im stuck.. import java.util.scanner; public class program { public static void main (string [] args) { system.out.println("please enter number:"); int x = nextint(); if (x == 1) { (int x = 5; x == 5;x++) // array of 1(first menu) system.out.println ("do want read another? (yes/no):"); system.out.println ("please enter menu number:") // return if it's new entered value.... } else if (x == 2) { loop of array 2 system.out.println ("do want read another? (yes/no):"); system.out.println ("please enter menu number:&qu