title: loop break not working inside switch block on array of strings
body: <p>Please refer the below code in which loop break does not work inside the switch block, can you help?</p>
  
  <pre><code>    String Books[] = { "Harry Potter", "To Kill a Mocking Bird", "Hunger Games" };
  
      //For loop is not breaking after getting the correct value
      for (int t = 0; t &lt; Books.length; t++) {
        switch (Books[t]) {
          case "Harry Potter":
               System.out.println("Getting from switch case " + t + " " + Books[t]);
              break;
          default:
              System.out.println("Invalid search for book from switch case");
              break;
          }
      }
  </code></pre>