problem statement - I want to look in a directory and list all the files in it which are .java files.
here's one way to do it (
many java books I've looked at contain very similar examples):
from Grant Palmer's "Java Programmer's Reference" (Wrox Press 2000):
My questions: I understand that we call for a new object in class "MyFilter" to be constructed with this line "String[] fileList =
fobj.list( new MyFilter("java") );
How does the
accept method,
in the MyFilter class, get called and run when this line is executed ???
------------------------------------------------