All About INTERFACE FilenameFilter in Java



Instance of classes which implement this interface are used to filter filenames. These instances are used to filter directory listing in the list method of class File(Class File,Utility) and by the abstract window toolkit's file dialog components.

The structure of the Interface FilenameFilter is given as:

public interface java.io.FilenameFilter{
//method
public abstract boolean accept(File dir,String name);
//Determines whether a specified file should be included in a file list.
//Returns true if the name should be included in file list,false otherwise.
}
 
All About INTERFACE FilenameFilter in Java All About INTERFACE FilenameFilter in Java Reviewed by Animesh Chatterjee on October 12, 2018 Rating: 5

No comments:

Powered by Blogger.