// Using subclass methods. // In this case, MultiFilter.addNever() is implemented // in MultiFilter but not in the base FileNameFilter. // oops. f. has no addNever method. FileNameFilter f = new MultiFilter(); f.addNever( never ); // should read FileNameFilter f = new MultiFilter(); ((MultiFilter)f).addNever( never ); // or more efficiently MultiFilter f = new MultiFilter(); f.addNever( never );