Hi.. im new to java and im writing a code in which i have to show a main menu with matrices addition amd multiplication.. i have almost com[leted it.. but i dont know how to show the option of "MENU AGIAN yes/no"?? what could be the code of it.. cod is:
import java.util.*;
class Case {
import java.util.*;
class Case {
public static void main (String args[ ]) {
Scanner input= new Scanner (System.in);
int x;
char ch;
System.out.println();
System.out.println("\n");
System.out.println(" *** *** ");
System.out.println(" ** ** ** ** ");
System.out.println(" ** ** ** ** AIN");
System.out.println(" ** * ** ENU");
System.out.println(" ** ** ");
System.out.println("\n");
System.out.println("1.MATRIX FOR ADDITION ");
System.out.println("2.MATRIX FOR MULTIPLICATION ");
System.out.println("3. EXIT.");
System.out.println("\n");
System.out.println("ENTER A NUMBER BETWEEN 1-3");
x=input.nextInt();
System.out.println("\n");
switch(x)
{
case 1:
{
System.out.println("ADDITION");
} break;
case 2:
{
System.out.println("multiplication");
} break;
case 3:
{
System.out.println("\n");
System.out.println("Allah Hafiz");
System.exit(0);
} break;
}
System.out.println("\n");
//System.out.println("WANT MENU AGAIN?? y/n");
}
}