title: Switch expressions: Why does Java consider my break - String lines not to be statements?
body: <p>Trying to understand switch expression and came up with the following code. In fact I get &quot;not a statement&quot; error for all &quot;break - String&quot; combinations. What am I doing wrong?</p>
  <pre><code>String i = switch(value) {
              case 0:
                  break &quot;Value is 0&quot;;
              case 1:
                  break &quot;Value is 1&quot;;
              case 2:
                  break &quot;Value is 2&quot;;
              default:
                  break &quot;Unknown value&quot;;
          };
  </code></pre>