import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class TrieExample {
  public static void main(String[] args) {

    // Open the data file
    Scanner scf = null;
    try {
      scf = new Scanner(new File("./data/peter_piper.txt"));
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }

    TrieST<Integer> st = new TrieST<Integer>();

    // Read file's next line
    while (scf.hasNextLine()) {
      Scanner scl = new Scanner(scf.nextLine());

      // Read line's next word
      int i = 0;
      while (scl.hasNext()) {
        String key = scl.next();
        st.put(key, i);
        i++;
      }
    }

    // print results
    for (String key : st.keys()) {
      System.out.println(key + " " + st.get(key));
    }

    System.out.println();

    System.out.println("Keys with prefix \"pi\"");
    for (String key : st.keysWithPrefix("pi")) {
      System.out.println(key);
    }
    System.out.println();
  }
}

@@ -689,16 +689,57 @@
 results%0A
+    System.out.println(%22Symbol table:%22);%0A
     for 
@@ -790,16 +790,23 @@
 println(
+%22* %22 + 
 key + %22 
@@ -904,16 +904,17 @@
 x %5C%22pi%5C%22
+:
 %22);%0A    
@@ -983,16 +983,23 @@
 println(
+%22* %22 + 
 key);%0A  
@@ -1027,15 +1027,166 @@
 intln();
+%0A%0A    System.out.println(%22Longest prefix of %5C%22peckleton%5C%22:%22);%0A    System.out.println(%22* %22 + st.longestPrefixOf(%22peckleton%22));%0A    System.out.println();
 %0A  %7D%0A%7D%0A

Add usage example for longestPRefixOf() method