title: java error: cannot find symbol EqualsUtil.areEqual
body: <p>I am a beginner in Java.I am tying to implement some basic functionality in the class below.</p>
  
  <pre><code>/*Demonstrate the different data types in java*/
  import java.io.*;
  import java.util.*;
  
  public class TypeDemo implements java.io.Serializable
  {
      static byte b1=50;             /*byte variable     8 bits : (-128 TO 127) */
      static short s1=10;            /*short variable   16 bits : (-32,768 TO 32,767) */
      static int i1=-555;            /*int variable     32 bits : (-2,147,483,648 to 2,147,483,647) */
      static long l1=100000;         /*long variable    64 bits : (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807) */
      static float f1 = 123.2f;      /*float variable   32 bits : (4.9e-324 to 1.8e+308) (Approximate) */
      static double d1 = 1.4512;     /*double variable  64 bits : (1.4e-045 to 3.4e+038) (Approximate) */
      static char ch1 = 'Y';         /*char variable    16 bits : (0 - 65,536) (Needed for Unicode) */
      static boolean b = false;      /*boolean variable  1 bit  : (true OR false ) */
  
      public static void display()
      {
          System.out.println("The value of different variables");
          System.out.println("byte      : " + "b1  = " +b1);
          System.out.println("short     : " + "s1  = " +s1);
          System.out.println("int       : " + "i1  = " +i1);
          System.out.println("long      : " + "l1  = " +l1);
          System.out.println("float     : " + "f1  = " +f1);
          System.out.println("double    : " + "d1  = " +d1);
          System.out.println("char      : " + "ch1 = " +ch1);
          System.out.println("boolean   : " + "b   = " +b);
      }
  
      public boolean equals(Object aThat)
      {
          /*check for self comparision*/
          if (this == aThat) return true;
  
          /* use instanceof instead of getClass here for two reasons
           * 1. if need be, it can match any supertype, and not just one class;
           * 2. it renders an explict check for "that == null" redundant, since
           *    it does the check for null already - "null instanceof [type]" always
           * 3. returns false. (See Effective Java by Joshua Bloch.)
          */
          if ( !(aThat instanceof TypeDemo) ) return false;
  
          /* 
           * Alternative to the above line :
           * if ( aThat == null || aThat.getClass() != this.getClass() ) return false;
           */
  
             /*cast to native object is now safe*/
           TypeDemo that = (TypeDemo)aThat;
  
          /*
           *now a proper field-by-field evaluation can be made
           */
  
          return  EqualsUtil.areEqual(this.b1, that.b1) &amp;&amp;
                  EqualsUtil.areEqual(this.s1, that.s1) &amp;&amp;
                  EqualsUtil.areEqual(this.i1, that.i1) &amp;&amp;
                  EqualsUtil.areEqual(this.l1, that.l1) &amp;&amp;
                  EqualsUtil.areEqual(this.f1, that.f1) &amp;&amp;
                  EqualsUtil.areEqual(this.d1, that.d1) &amp;&amp;
                  EqualsUtil.areEqual(this.ch1,that.ch1) &amp;&amp;
                  EqualsUtil.areEqual(this.b, that.b);
     }
  
     public static void main(String[] args)
     {
          display();
     }
  }
  </code></pre>
  
  <p>I am trying to override <code>equals()</code> method to compare the object field by field.I am not even able to compile the program.</p>
  
  <pre><code>TypeDemo.java:55: error: cannot find symbol
      return  EqualsUtil.areEqual(this.b1, that.b1) &amp;&amp;
              ^
    symbol:   variable EqualsUtil
    location: class TypeDemo
  TypeDemo.java:56: error: cannot find symbol
              EqualsUtil.areEqual(this.s1, that.s1) &amp;&amp;
              ^
    symbol:   variable EqualsUtil
    location: class TypeDemo
  TypeDemo.java:57: error: cannot find symbol
              EqualsUtil.areEqual(this.i1, that.i1) &amp;&amp;
              ^
    symbol:   variable EqualsUtil
    location: class TypeDemo
  TypeDemo.java:58: error: cannot find symbol
              EqualsUtil.areEqual(this.l1, that.l1) &amp;&amp;
              ^
    symbol:   variable EqualsUtil
    location: class TypeDemo
  TypeDemo.java:59: error: cannot find symbol
              EqualsUtil.areEqual(this.f1, that.f1) &amp;&amp;
  </code></pre>
  
  <p>I have imported <code>java.util.*</code> still it doesn't seem to be able to find <code>EqualsUtil</code>.</p>