// FieldDotDemoTest1.java

public class FieldDotDemoTest1
{
   public static void main(String[] args)
   {
      // Creating two new FieldDotDemo objects:
      FieldDotDemo a = new FieldDotDemo(2);
      FieldDotDemo b = new FieldDotDemo(5);

      // The nested if/else statement below should
      // print "a < b":
      if (a.compareTo(b) < 0)
         System.out.println("a < b");
      else if (a.compareTo(b) == 0)
         System.out.println("a == b");
      else
         System.out.println("a > b");

      // Creating two more new FieldDotDemo objects,
      // one as an argument and another being returned
      // by the add3 method:
      FieldDotDemo c = FieldDotDemo.add3(a, b, new FieldDotDemo(4));

      // The statement below should print "22":
      System.out.println(FieldDotDemo.getSumAll());
   }
}