I have declared this interface:
public interface Filter
{
/**
Determines whether to accept an object.
@param x the object to be filtered
@return true to accept an object, false otherwise
*/
boolean accept(Object x);
}
So Now what I need to do is to implement it along with another interface already declared and implemented in the class. So my question is if I can implement both interfaces in the same class in this way.
public class DataSet implements Measurer, implements Filter{
......
}
or
public class DataSet implements Measurer, Filter{
.....
}
Thank you
Java supports multiple implementation of interfaces. The proper syntax is: