i saw some code where HashTable(collection) value is passed as interface
public class Channels {
private static final Hashtable<String, IChannel> channels =
new Hashtable<String, IChannel>();
public void putChannel(String serviceChannelName, IChannel channel) {
channels.put(serviceChannelName, channel);
}
}
like
public interface IChannel {
public void start();
public void stop();
}
what exectly going to use and and how it can possible to pass interface object (while we can not create interface object.?? please help me