See Fr Chris' code
This is a small taste of a data structure called a binary tree.
This is an applet, and applets are NOT allowed to write things to files,
so this applet can't actually learn anything new, but if you download the
questions.txt file and this Questions20App.jar file to your computer,
you can run the java application on your computer, and it WILL record your
new questions to the questions.txt File (Make sure they are both in the same folder), and you can record all the questions and creatures you type into it.
Here is a map of what the applet knows about: