Navigating the Menu option

public static void main(String[] args){
            System.out.println("What do you want to perform choose :\n 1. Searching\n 2. Sorting\n 3. Exit\n ");
            Scanner input = new Scanner(System.in);
                    switch(input.nextInt()){
                        case 1 : System.out.println("1. Linear Searching\n2. Binary Searching\n");
                                        switch(input.nextInt()){
                                            case 1 : linearsearch();
                                                        break;
                                            case 2 : binarysearch();
                                                        break;
                                        break;
                        case 2 : System.out.println("1. Bubble Sorting \n2. Selection Sorting\n3. Insertion");
                                        switch (input.nextInt()){
                                            case 1 : bublesort();
                                                        break;
                                            case 2 : System.out.println("Insertion Sorting");
                                                        break;
                                            case 3 : System.out.println("Selection Sorting");
                                                        break;
                                        break;
                        case 3 : System.exit(input.nextInt());
                                    break;
         }hello can any one help me to perform this menu.. my program will exit every complete its operation. what i wanted to accomplish is that i want my program should not exit after performing the operation it should again present the menu option again and again. it will only exit if the user chooses the exit option

im sure this advise has been given to you now multiple times in a few different threads so hopefully this will wrap it up for you
public static void main(String[] args){
while(true){
            System.out.println("What do you want to perform choose :\n 1. Searching\n 2. Sorting\n 3. Exit\n ");
            Scanner input = new Scanner(System.in);
                    switch(input.nextInt()){
                        case 1 :
                                              linearsearch();         //calls your linearsearch method
                                             continue;                 //starts the loop again
                        case 2 :
                                            sorting();                    /calls your sortingmethod
                                             continue;                   //starts the loop again
                        case 3 :
                                             break;                                //exists the loop
                        default:           System.out.println(input.nextInt()+ "is not a valid charachter , please try again");
}//end of while loop
         }

Similar Messages

  • Both the 'delete' button and in the menu options do not delete messages but change them to unread. How can I remedy this?

    The delete function seems to no longer work in Thunderbird. Both the 'delete' button and in the menu options do not delete messages but change them to unread.
    I have tried to fix it by deleting the trash / deleted files as suggested in another thread but it made no difference. The delete key still works to delete things outside of Thunderbird (including here for example).
    I have not uninstalled / reinstalled. I have rebooted a couple of times and it hasn't made any difference.
    I did go through and delete a huge number of old emails a few days ago, but I have cleared out the Deleted folders and it made no difference.
    All suggestions appreciated.

    Right click on any of the other right panel headers  in Slideshow module to open the context menu. You should be able to reactivate the Options panel from there.

  • Im trying to find my iPhone via iCloud but i does not show a map with its last know location. It only shows the menu options. My iPad and Mac show up but the map of my iPhone does not.

    Im trying to find my iPhone via iCloud but i does not show a map with its last know location. It only shows the menu options. My iPad and Mac show up but the map of my iPhone does not. Can anyone help?

    If your phone is turned off or not connected to the Internet, you will be unable to locate it. Last known location is only stored for 24 hours.

  • Why can't i access or click on the menu options at the top of ANY web page? Also, Can't close a moddle window using the x in the upper right,?

    Why can't i access or click on the menu options at the top of ANY web page? Also, Can't close a moddle window using the x in the upper right,?

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • Why does the menu option change to "save as" after I select the print button?

    why does the menu option change to "save as" after I select the print button?

    >>The print command is selected in the File pull down menu, the print menu page pops up, I can then select my networked printer (which incidentally is confirmed to work with other software), the print command is in the bottom right hand corner and finally after depressing this print button a "save as" pop-up menu appears and then it only re-saves the file. Is this an issue with the pdf reader install?  

  • The menu options won't highlight.

    i'm done with everything, im about to burn but the menu options wont highlight. im making a slideshow for my friends because we went camping and i have pictures lol :P
    Message was edited by: isaac556

    Hi isaac556
    Welcome to Apple discussions. I see this is your very first post here on iDvd forums. As already stated, most of us can't read minds. But I'll go ahead and assume you are trying to make the slide show within iDvd and not elsewhere like iMovie for example (where you might have better luck if you haven't already tried that). iMovie is a very viable option (no 99 photo limits) as are other apps (Roxio /Fotomagico, Photo to Movie) you'll find mentioned throughout this forum. However most are 3rd party and thus are not free. So I'll try and stay with those you likely already have ... hence the iMovie recommendation.
    If iDvd's slideshow function is not performing as expected (not hi-lighting the button/s as expected) and you haven't exceeded 99 images and have played by all the other rules mention in the Help Menu; then it's time to disposed of iDvd's plist
    Go to your HOME folder (the one that looks like a house) > Library > Preferences
    over to:
    com.apple.iDvd.plist
    and get rid of of it by dragging and dropping to the trash ...
    followed by a complete restart of your mac. Thereafter you need to repair permissions from apple's disc utility (within applications > Utilities > Disc Utility), and again restart the app.
    Good luck on this and feel free to keep us posted.
    Message was edited by: SDMacuser

  • I can't find the menu option in iTunes to authorize my PC.  Where is it?

    I can't find the menu option in iTunes to authorize my
    PC.  Where is it?

    Press the Alt and S keys and choose Authorize this Computer, or click here, follow the instructions, click on Store in the menu bar, and choose Authorize this Computer.
    (113428)

  • Does anyone ever get a human being when calling prepaid support at 888-294-6804?an stay on the line, but it just keeps repeating the menu options and eventually hangs up on me.  That is really irrita

    Does anyone ever get a human being when calling prepaid support at 888-294-6804? It tells me call volumes are higher then normal and I can stay on the line, but it just keeps repeating the menu options and eventually hangs up on me.  That is really irritating!!  I'd at least like the option to wait on hold.  I guess I should have listened to the warnings about prepaid support before switching to prepaid last week.
    The reason I'm calling support is I'd like to know when I will be getting the extra 500MB of data when signing up for auto pay.  This is one of the reasons I switched to a 4G Allset plan.  I signed up for auto pay promptly after setting up my online account when I switched from post paid to pre paid on Thursday July 17, 2014.

        I'm sorry you are having trouble reaching a representative, mhaider60. When calling our Prepaid department you can reach a representative using the following number and prompts: 888-294-6804 when prompted, select 4, 6, and 4 to reach a representative.
    AndreaS_VZW
    Follow us on Twitter @VZWSupport

  • There is a white stripe across the top of the browser window which covers the top of the sceen. I cannot see the navigation or menu options, how can I fix?

    There is a white stripe about 3/4 of an inch tall across the top of the window. I cannot grab the menu bar, or see the menu or navigation window, or the search bar. When I click on the white strip, it goes through to the desktop like the top of the program does not exist.
    I've never seen this issue before.

    A screenshot may help
    * [[How do I create a screenshot of my problem?]]

  • Why does clicking on the Firefox button or right-clicking bring up either a very small thumbnail or a zoomed in view of the menu options?

    Whenever I click on the Firefox menu button or right-click on a hyper link within the broswer, instead of a menu of choices, I am presented with either a tiny thumbnail of the page I am on and the menu expanded (also very tiny). After moving the mouse, the thumbnail disappears and becomes a hyper-zoomed display of the menu that should have displayed. The zoom really looks like what an assistive-reading display would look like.

    hello, please try [[Upgrade your graphics drivers to use hardware acceleration and WebGL|updating your graphics driver]] (this should be the right link for your model & system:
    http://support.amd.com/us/gpudownload/windows/Pages/radeonaiw_vista64.aspx), or in case this doesn't solve the issue, disable hardware acceleration in ''firefox > options > advanced > general''.

  • I don't see the menu "Options"

    I'm working with Mac. Is it a restriction of my account ?

    On the Mac Options is known as Preferences and is found in the Firefox menu.
    http://kb.mozillazine.org/Menu_differences_in_Windows,_Linux,_and_Mac

  • Stop the navigation to menu options when user is creating a bp

    Hello and thanks.
    If you are in view (CreateOrg IUICMD) and user select an option of menu (For example contacts)
    systems go to contacts is view.
    It's possible stop this and make that user can't leave the view (CreateOrg) unless press Button Cancel or Save.
    Thanks in advance

    Found it .
    We can seed customize D:\Oracle\Middleware\Oracle_WC1\webcenter\modules\oracle.webcenter.framework_11.1.1\creat-page-view.jar ! createpagewizard-name.xml file or related files to achieve this .
    -Siddharth

  • I cannot get the Menu options (file etc) or Help in updated firefox. I've got Windows Vista. I've done all the things reccomended in help pages ( i had to search for Help online!) and they don't work,

    The ALT key gave no response
    I found the place to tick Menu toolbar but no toolbar came up.
    The Restore defaults toolbar thing doesn't have the options I want (File, print, help etc)
    Beginning to think I'm going crazy

    fredmcd-hotmail,
    The only "Firefox symbol" I see is the one with the blue fox 'spanning" a red globe. Neither left or right click brings up options.
    As I wrote initially: "When I right-click on an empty section of the Tab Strip, all I get is options for the Navigation Toolbar, the Bookmarks Toolbar, and the Add-on Bar; no Menu Bar option."

  • I have an Ipod classic 30 GB U2 , it s been working fine for the past 3-4 years until now it starts to get stuck when navigating the menu or even when clicking something,Basically i am only able to use it as a storage device not its ipod features

    It is recognized via Itunes as IPOD and i am able to connect it through USB cable to the pc and manage its physical memory via My Computer. But the problem is I cannot use anything on it as an IPOD (Like Music video and note stuff inside it).It boots as saying its got low battery power and after a while "Do not disconnect" logo appears after it is charged, i am able to operate it as normal ipod but when i click something it gets hanged like a PC and it stays there until the battery is too low . No matter what button i press (Menu or play buttons) continuously or the combination to restart or reset its in the same static state,,no reaction...even when i connect it to the pc via USB or charger nothing happens ..it stays in the same screen whereever i navigated last. After all its power is used up the same process continues that i can use it as an external hard disk namely its 20 GB memory...
    Is there any way I can solve this problem via Itunes restore or any other used method to restore it to factory settings ?? ...I haven't used any method to restore it until now as i have migrated to IPAD,,,since then i've been using this as an external hard disk....may be if its restored to old condition i can carry this where ever i want unlike the massive IPAD...its like carrying a solar panel unlike an handy IPOD

    Hi mafiose15,
    Thanks for visiting Apple Support Communities.
    Restoring your iPod to factory settings is the best way to try and get it back to working order. You can use the instructions below to restore it:
    How to restore iPod
    Verify that you have an active Internet connection, because you may need to download new versions of the iTunes and iPod Software.
    Download and install the latest version of iTunes if necessary.
    Open iTunes. Connect your iPod to your computer using the USB or FireWire cable that came with your iPod.
    After a few moments, your iPod will appear in the Source panel in iTunes.
    Select your iPod in the Source panel. You will see information about your iPod appear in the Summary tab of the main iTunes window.
    Click Restore.
    If you are using a Mac, you will be asked to enter an administrator’s name and password.
    A progress bar will appear on the computer screen, indicating that stage one of the restore process has begun. When this stage is done, iTunes will present one of two messages with instructions specific to the iPod model you are restoring.
    Disconnect iPod and connect it to iPod Power Adapter (typically applies to older iPod models).
    Leave iPod connected to computer to complete restore (typically applies newer iPod models).
    During stage two of the restore process, the iPod displays an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remain connected to the computer or iPod power adapter during this stage.
    Note: The progress bar may be difficult to see, because the backlight on the iPod display may be off.
    After stage two of the restore process is complete, the iTunes Setup Assistant window will appear. It will ask you to name your iPod and choose your syncing preferences, as it did when you connected your iPod for the first time.
    You can find the instructions in this article:
    Restoring iPod to factory settings
    http://support.apple.com/kb/ht1339
    All the best,
    Jeremy

  • Why take away the menu options on right-click?

    Before the most recent update, I could right-click on my page and press a key like 'b' or 'r' to go back and reload.
    You have taken away those keystroke options w/ the new click-friendly right-click menu. This slows me down and there's no reason we can't have both.

    I spend most of my time w/ one hand on the mouse and left hand on keyboard.
    It worked so nicely just to right-click and hit a key to go back, refresh, etc..

Maybe you are looking for

  • Accidently synced my friends ipad with mine, how do I unsync/reset??

    So my friend brought me her ipad and I plugged it into my computer and opened itunes. I think i accidently clicked sync and now she cant see any of her old stuff. Now its basically a replica of my ipad. She had a lot of photos and apps that she doesn

  • Media Manager - Connected and Not

    Blackberry Desktop manager indicates that the device is connected, shows the pin in the lower left of the window. However when I log into Media Manager it says "There is no device connected. Please connect your device to show its contents." Screen of

  • Upgrade Camera Raw in PSE 7 on a Windows 7 64bit

    Hi Guys, Did anyone try it? I did place the file where it should go but my Panasonic DMC-FZ35 is in versions 5 and up of the plugin and still will not open. Any suggestions? For now I had to use Silkypix. Thank you!

  • SAP version 4.7 and ECC 5.0

    HI Friends, Could you plz help me out to know what are overall commonalities and differences and in view of SD module also in SAP R/3 Version 4.7 and ECC 5.0? Thanks in advance. Regards, Vamsi P.

  • FF no longer updates passwords, save passwords is selected.

    Firefox 26.0 suddenly stopped updating my passwords. It asks if I want it to remember new passwords, but I changed my yahoo email password and it does not ask if I want it to update the password. When I come back it still has the old password.