title: Ternary Operator Limits
body: <p>Let's say we have following if statement:</p>
  
  <pre><code>int a = 1;
  int b = 2;
  
  if(a &lt; b) {
      System.out.println("A is less than B!");
  }
  else {
      System.out.println("A is greater or equal to B!");
  }
  </code></pre>
  
  <p>I have been wondering that if ternary operator replaces if statement when if statement consists from one line of code in each sub-block (if and else blocks), then why above example is not possible to write like this with ternary operator?</p>
  
  <pre><code>(a &lt; b) ? System.out.println("A is less than B!") : System.out.println("A is greater or equal to B!");
  </code></pre>