title: Cannot reduce the visibility of the inherited method from object
body: <p>I have defined the following two classes:</p>
  
  <pre><code>public abstract class Subject {
  
      private ArrayList&lt;ClockObserver&gt; clockObserverList = new ArrayList&lt;ClockObserver&gt;();
  
  
      public void attach(ClockObserver clockObserver) {
          // begin-user-code
          // TODO Auto-generated method stub
          clockObserverList.add(clockObserver);
          // end-user-code
      }
      public void dettach(ClockObserver clockObserver) {
          // begin-user-code
          // TODO Auto-generated method stub
          clockObserverList.remove(clockObserver);
          // end-user-code
      }
  
      protected void notify() {
          // begin-user-code
          // TODO Auto-generated method stub
          for(int i= 0; i &lt; clockObserverList.size(); i++)
          {
              clockObserverList.get(i).update();
          }
          // end-user-code
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public class SystemClock extends Subject {
      private int hour;
      private int minute;
      private int second;
      public void setTime(int hour, int minute, int second) {
          this.hour = hour; 
          this.minute= minute; 
          this.second = second;
          notify();
      }
      public ClockTime getTime() {
           ClockTime clockTime = new ClockTime();
           clockTime.hour = this.hour;
           clockTime.minute = this.minute;
           clockTime.second = this.second;
          return clockTime;
      }
      public void displayTime() {
  
          System.out.println("Time is :" + this.hour + ":" + this.minute + ":" + this.second);
      }
  }
  </code></pre>
  
  <p>I got the following error for notify function:</p>
  
  <pre><code>Multiple markers at this line
      - Cannot override the final method from Object
      - overrides java.lang.Object.notify
      - Cannot reduce the visibility of the inherited method from 
  </code></pre>
  
  <p>Even when I change its visibility from protected to public, I still have the following error:</p>
  
  <pre><code>Multiple markers at this line
      - Cannot override the final method from Object
  </code></pre>
  
  <p>Could you please help me what is the problem?</p>