title: Why am i getting The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math error message
body: <pre><code>Collections.sort(employees, new Comparator&lt;Employee&gt;() {
  
      public int compare(Employee s, Employee s1) {
          int comp = s.getName().compareTo(s1.getName());
          if (comp != 0) {    // names are different
              return comp;
          }
          return s.getSalary() - s1.getSalary();
      }
  });
  System.out.println(employees);
  
  }
  </code></pre>