I have created an interface Response
Interface Response{
public output(String s);
}
and i implement this interface on my class A
. now i have a class B
too and it also need to implement this interface but it need different parameter for interface method. (mean class B needs public output(Comment c);
)
So my question is , do i need to create another interface for class B because it need different parameter
Like this
Interface Response{
public output(Comment c);
}
or is there any way to handle this.
also can i used object data type
for this.?
Thank you.