how can i modify this program to list the *.java file using FIlenameFilter

Discussion in 'Java' started by mahesh, Dec 6, 2006.

  1. mahesh

    mahesh Guest

    public class MatcherEx //implements FilenameFilter
    {
    static String suffix=".txt";
    private FilenameFilter filter;

    public static void main(String[] args)throws IOException {

    File fs=new File("\\d:");
    File []path1=fs.listFiles();

    for(int i=0;i<path1.length;i++)
    {
    System.out.println("\n"+path1.toString());
    }
    }
    }
    mahesh, Dec 6, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Flowers

    Re: Easy FileFiletr/FilenameFilter

    Andy Flowers, Jun 29, 2003, in forum: Java
    Replies:
    0
    Views:
    852
    Andy Flowers
    Jun 29, 2003
  2. Bill Medland

    FilenameFilter details

    Bill Medland, Mar 2, 2006, in forum: Java
    Replies:
    1
    Views:
    2,434
    Roland de Ruiter
    Mar 3, 2006
  3. mahesh
    Replies:
    3
    Views:
    360
    GenxLogic
    Dec 6, 2006
  4. Alan

    FilenameFilter woes

    Alan, Dec 29, 2007, in forum: Java
    Replies:
    10
    Views:
    722
    Andrew Thompson
    Dec 29, 2007
  5. Lin Jingxian
    Replies:
    2
    Views:
    86
    Tad McClellan
    May 9, 2005
Loading...

Share This Page