Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Seems like I'm forgetting someone

Name: Anonymous 2013-03-08 0:22

Whatever happened to Wokon?

Name: Anonymous 2013-03-08 0:28

Hello, I'm not so good at programming and can't tell why this isn't working. Whatever I input, it will always go straight to the else statement.

    public void pizzaIntro()
    {
        Scanner user_input = new Scanner(System.in);
        String user_command = "null";
        String apology = "I'm sorry it appears there has been some kind of mistake in your order.";
        System.out.println("Welcome to " + cM + " here we strive to deliver excellent services to all our customers!");
        System.out.println("The current prize for pizza is $" + bP + " and an extra $" + tP + " per topping.");
        System.out.println(); System.out.println();
        while(user_command != "exit")
        {
            System.out.print("Would you like toppings?(yes/no):");
            user_command = user_input.next();
            if(user_command.toLowerCase() == "yes")
            {
                System.out.println("Good Eat Your Pizza.");
            }
            else if (user_command.toLowerCase() == "no")
            {
                System.out.println("Well Fuck You Too Then!");
            }
            else
            {
                System.out.println(apology);
                System.exit(1);
            }
        }
        pic1.show();
    }

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List