title: Object Oriented questiond about interface, abstract class and concrete class
body: <p><strong>1)</strong> OnCreate is public method of instantiated object from ClsLast class. <strong>But I wanted to restrict OnCreate method as protected</strong>.</p>
  
  <pre><code>interface InterFace {
      void OnCreate();
  }
  
  class ClsFirst implements InterFace {
      @Override
      public void OnCreate() { }
  
  }
  
  class ClsLast extends ClsFirst{ }
  
  class Test {
      static void main(){
          ClsLast objClsAct = new ClsLast();
          objClsAct.OnCreate();
      }
  }
  </code></pre>
  
  <p><strong>2)</strong> If I set OnCreate method as protected in InterFace </p>
  
  <pre><code>interface InterFace {
      protected void OnCreate();
  }   
  </code></pre>
  
  <p>I'm getting error like this:
  <code>Illegal modifier for the interface method OnCreate; only public &amp; abstract are permitted</code></p>
  
  <p><strong>3)</strong> If I set protected the method inside the ClsFirst class which implements InterFace like this:</p>
  
  <pre><code>interface InterFace {
      void OnCreate();
  }   
  
  class ClsFirst implements InterFace {
      @Override
      protected void OnCreate() { }
  
  }
  </code></pre>
  
  <p>I'm getting this error:
  <code>Cannot reduce the visibility of the inherited method from InterFace</code></p>
  
  <p><strong>4)</strong> When I change the ClsFirst as abstract class and implements InterFace</p>
  
  <pre><code>interface InterFace {
      void OnCreate();
  }   
  
  abstract class ClsFirst implements InterFace {
  
  }
  </code></pre>
  
  <p>I haven't to implement OnCreate method inside the ClsFirst class but ClsLast why?</p>
  
  <p><strong>Summary</strong></p>
  
  <ol>
  <li>How can I set Interface methods can only be used in derived classes?</li>
  <li>Why can't I set methods with protected access inside Interface?</li>
  <li>Why can't I set the accessor type of Class different than public after I implement the InterFace?</li>
  <li>abstract classes that even if they implements an interface don't have to add unimplemented methods itself until one class derives abstracted classes. Why?</li>
  </ol>
  
  <p>Thank you so much for your kind answers from now.</p>