import java.util.Scanner; public class TestBST { public static void main(String[] args) { Scanner in = new Scanner(System.in); BST x = new BST(); // Key = String, Value = String x.put("lion", "roar!!"); x.put("dog", "woof"); x.put("tiger", "roar!"); x.put("cat", "miauw"); x.put("horse", "brrr"); x.put("ape", "uh-uh"); x.put("cow", "moo"); x.put("donkey", "i-oh"); x.put("jackal", "a-uuh"); x.put("owl", "uh-urh"); x.put("man", "talks"); x.put("zebra", "hrrrh"); x.printBST(); String k, v; while ( true ) { System.out.print("\n\nEnter a key to search on ==> "); k = in.next(); v = x.get( k ); System.out.println("Key = " + k + " ==> get() returns: " + v); } } }