import java.util.Scanner; public class TestSplay { public static void main(String[] args) { Scanner in = new Scanner(System.in); Splay_BST x = new Splay_BST(); // Key = String, Value = String x.put("44", 6); x.printBST(); x.put("55", 5); x.printBST(); x.put("66", 4); x.printBST(); x.put("77", 3); x.printBST(); x.put("88", 2); x.printBST(); x.put("99", 1); x.printBST(); String k; Integer 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); System.out.println("\nSplay tree is now:"); x.printBST(); } } }