public class Test { // This project is 3 parts. A menu which you can get to the other parts. // There is then the printing pattern which /** * @param args */ public static void main(String[] args) { if (args.length == 0) { boolean loop = false; do { //Initialising the Scanner which is //used to pick up the users input Scanner sc = new Scanner(System.in); //Menu - This is the menu in which you choose what // you want to do in the program System.out.println("Menu"); System.out.println("a. Character Pattern"); System.out.println("b. Reverse Text"); System.out.println("x. Exit The Program"); String MenuIn = sc.nextLine(); System.out.println("You Chose " + MenuIn); if (MenuIn.contentEquals("a")||MenuIn.contentEquals("A")) { Printingpatterns(); } else { if (MenuIn.contentEquals("b")||MenuIn.contentEquals("B")) { Reverse(); } else { if (MenuIn.contentEquals("x")|| MenuIn.contentEquals("X")) { System.exit(0); loop = true; } } } } while (loop = false); } } }