title: how to nest if statements in HashSet?
body: <p>I'm trying to use the plural form of the println for the time that the HashSet has more than one car in it and the singular form for when it it only has one.</p>
  
  <pre><code>package com.lynda.javatraining;    
  import java.util.HashSet;
  
  public class Main {
  
      public static void main(String[] args) {
  
          Car bmw = new Car();
          Car mercedes = new Car();
          Car hyundai = new Car();
  
          HashSet&lt;Car&gt; set = new HashSet&lt;&gt;();
          set.add(bmw);
          if (Car == 1) {
              System.out.println("there is " + set.size() + " car");
  
          } else {
              System.out.println("there are " + set.size() + " cars" );
          }
      }
  }
  </code></pre>