title: if statement inside the print statement?
body: <p>How can I write an if statement inside the print statement?</p>
  
  <pre><code>public boolean checkEmpty()
  {
      if(array.isEmpty)
      {
          Sytem.out.println("The List is empty");
      }
      else
      {
          System.out.println("The list has: " +  if(array.size() &gt; 1)) {"Items"} + else {"item"} );
      }
  }
  </code></pre>