title: Multiple Statements in the Ternary Operator
body: <p>What is the right syntax to have multiple statements in my ternary operator statement?</p>
  
  <pre><code>str.length() == 1 ? (str = str.replace(0, str.length(), "00")  &amp;&amp; flag = false) : str = str.deleteCharAt(str.length() - 1);
  </code></pre>
  
  <p>I need to execute a couple of statements when the length of my <code>StringBuilder str</code> is 1 </p>
  
  <ol>
  <li>Replace the str with "00"</li>
  <li>Unset flag</li>
  </ol>
  
  <p>Any help would be greatly appreciated.</p>