java Interface as method parameter and return type
807589Sep 1 2008 — edited Sep 1 2008Hi,
I am new to java programming and have a question. Is it possible to pass java interface as a method parameter?
In the example below the IHOConnection interface has 2 methods defined and no constants defined in it, but there is no implemented class available. How the values are being passed/ retrieved from this method?
public HOContent makeEntry(HO aRequest, IHOConnection aConnection) throws HOPopulateException
2. public IMessage receiveResponse(long aTimeout)
throws BOException
The above method returns a value of type IMessage interface. This interface has an implemented class. How to receive the return value of this method? Need to create an instance of class that implements IMessage?
thanks,
Satheesh