mercredi 29 juillet 2020

Can we set values to interface methods from class A and get values from class B in java

I have a Events interface contains two methods

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
}

Is it possible, if it is please show me one simple example.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire