class="java"> File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File file, String name) { if (name.endsWith(".properties")) { return true; } else { return false; } } });