This is just a short program to refresh your memory about how to program. Write a program that prompts the user for a name. Then display that name ten times. You should use a loop. If the name given is "Mitchell", display it only five times.
Recall that you can't just compare Strings
with ==. Instead, you must use the called .equals();
an example is below.
if ( name == "Mitchell" ) // this doesn't work
System.out.println("This will never be printed.");
if ( name.equals("Mitchell") ) // this, however, works just fine
System.out.println("Wow! Can I get your autograph?!?");
What is your name: gump gump gump gump gump gump gump gump gump gump gump
What is your name: Mitchell Mitchell Mitchell Mitchell Mitchell Mitchell