title: Short form for Java if statement
body: <p>I know there is a way for writing a Java <code>if</code> statement in short form.</p>
  
  <pre><code>if (city.getName() != null) {
      name = city.getName();
  } else {
      name="N/A";
  }
  </code></pre>
  
  <p>Does anyone know how to write the short form for the above 5 lines into one line?</p>