I am making a console application. I want to make a method to stop the application. Can anyone help please.

This is my code.

public void menu() {
        System.out.println("1 to go to menu help, 2 to go to head menu 3 to stop");
        int optie = scanner.nextInt();

        switch (optie) {
            case (1):
                menuHelp();
                break;
            case (2):
                showMenu();
            case (3):
                menuStop();
            default:
                System.out.println("ERROR: invalid value");
                clearScreen();

        }
    }

how do i make menuStop?

public void menuStop(){
        // What to do here??    
    }

Recommended Answers

All 2 Replies

thx!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.