001package edu.pdx.cs410J.java8;
002
003import java.io.File;
004
005public class FinalClassFilesUsingJava8 {
006  private static void findFiles(File dir) {
007    String suffix = ".class";
008
009    File[] classFiles =
010      dir.listFiles((File dir1, String name) -> {
011        return name.endsWith(suffix);
012      });
013
014    for (int i = 0; i < classFiles.length; i++)
015      System.out.println(classFiles[i]);
016
017    File[] subdirs =
018      dir.listFiles(file -> file.isDirectory());
019
020    for (int i = 0; i < subdirs.length; i++)
021      findFiles(subdirs[i]);
022  }
023
024}