import java.util.Scanner; import java.io.File; import java.util.Date; public class DictionaryTimer { public static void main(String[] args) { System.out.println("Enter name of dictionary file:"); Scanner input = new Scanner(System.in); String filename = input.next(); Date start1 = new Date(); Dictionary dict = new Dictionary(filename); Date end1 = new Date(); System.out.println(end1.getTime()-start1.getTime()); Date start2 = new Date(); for (int i = 0; i < 100; i++) { dict.contains("zzyzfys"); } Date end2 = new Date(); System.out.println(end2.getTime()-start2.getTime()); } }