java - How to call create a proper interface -


i have interface 2 methods

interface ifoo{   void fooone(a,b,c);   void footwo(d,e,f); } 

now there 2 implementation class extends interface. 1 follows:

class foo1 implements ifoo{  void fooone(a,b,c);   void footwo(d,e,f); }  

other 1 follows :

 class foo2 implements ifoo{   void fooone(a,b,c);   void footwo(d,e,f); }  

now foo2 class dosen't needs parameter e @ all. parameter e required class foo1. it's somehow ambious why parameter passed class foo2. there way can class foo2.

 class foo2 implements ifoo{   void fooone(a,b,c);   void footwo(d,f); }  

if footwo(d,e,f) interface, class foo2 must implement that.

however, expose non-interface overloaded public method foo2, this

public void footwo(d,f) {   this(d, null, f); } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -