title: I am trying to make my switch case loop back again if they get the default
body: <pre><code>    //Choice of choosing a dog or a cat
  
       String pet = input.next();
  
      switch (pet.charAt(0)) {
          case 'a' -&gt; {
              System.out.println(&quot;What is your dog's name? &quot;);
              String dogsName = input.next();
              System.out.println(&quot;Your Character's Name is: &quot; + playerName + &quot;\nYour Pet's Name is: &quot; + dogsName);
          }
          case 'b' -&gt; {
              System.out.println(&quot;What is your cat's name? &quot;);
              String catsName = input.next();
              System.out.println(&quot;Character Name: &quot; + playerName + &quot;\nPet Name: &quot; + catsName);
          }
          default -&gt; System.out.println(&quot;That is not a valid option. Please choose again.&quot;);
      }
  
     input.close();
  
  }
  </code></pre>
  <p>I can't find a loop to use that would bring it back to case a and repeatedly until the user answers using one of the choices, Any help would be awesome! Thanks</p>