title: Possible to repeat an if statement?
body: <p>I'm trying to make some sort of character creation to become more familiar with Java as I'm very new to it. I want the user to be able to choose a name and then select a class. For class selection I use the scanner method, and that means that the user will have to spell their class correctly.</p>
  
  <pre><code>import static java.lang.System.out;
  import java.util.Scanner;
  
  public class FirstTestNew {
  
  public static void main( String args[]) {
  
      Scanner nameInput = new Scanner(System.in);
      Scanner classInput = new Scanner(System.in);
  
      String Swordsman, Sorcerer, Elementalist, Assassin, Sharpshooter; // Classes
      int Level = 1;
      int Strength=1, Endurance=1, Vitality=1, Willpower=1, Luck=1, Intelligence=1; // Attributes
      int Health = Vitality*5*(Level*2); // HP = Vitality + Level
      int Mana = Willpower*10+(Level*2); // MP = Willpower + Level
      int Energy = Endurance*50+(Level*10); // NRG = Endurance + Level
      int PhysDmg = Strength*3+(Level*2); // Physical Damage
      int MagDmg = Willpower*3+(Level*2); // Magical Damage
  
      // Name selection
      out.println("Input your character name : ");
      String playerName = nameInput.nextLine();
      out.println("You are now to be known as "+playerName);
  
      // Class selection
      out.println("\nNow, what class would you like to play?\nSwordsman, Sorcerer, Elementalist, Assassin or Sharpshooter?");
      String playerClass = classInput.nextLine();
  
      if (playerClass.equals("Swordsman")){
          out.println("You chose to be a Swordsman!");}
  
      else if (playerClass.equals("Sorcerer")){
          out.println("You chose to be a Sorcerer!");}
  
      else if (playerClass.equals("Elementalist")){
          out.println("You chose to be an Elementalist!");}
  
      else if (playerClass.equals("Assassin")){
          out.println("You chose to be an Assassin!");}
  
      else if (playerClass.equals("Sharpshooter")){
          out.println("You chose to be a Sharpshooter!");}
  
      else {
          out.println("Make sure your spelling is correct.");}
      }
  }        
  </code></pre>
  
  <p>So, basically, if the user spells the class differently, I want the 'else' to be used, so they are informed of their spelling mistake, and then it repeats to the start of the if statement, so they can try again. Is this even possible to do? Maybe by using loops of some kind?</p>