title: Can we set values to interface methods from class A and get values from class B in java
body: <p>I have a Events interface contains two methods</p>
  <pre><code>Interface Events{
        public Event save(Event event);
        public search(int a, int b);
  }
  class A implements Events(){
        implementing methos and set values;
  }
  class B implements Events{
  Getting values from already set through class A to ClassB
  }
  </code></pre>
  <p>Is it possible, if it is please show me one simple example.</p>
  <p>Thanks in advance</p>