The code:
principalCode != "quit"
is checking if the reference pointer �principalCode� is pointing to the
String Literal you entered; it�s not. It is pointing to a String object. To see if that String object contains a string equal to "quit", you need to do this:
principalCode.equals("quit")
so to check for it not equaling "quit" you would do this:
!principalCode.equals("quit")
If you want to take case sensitivity out of the mix, so the input can be "Quit", "QUIT", "quit" or even "QuiT", you can do this:
!principalCode.equalsIgnoreCase ("quit")
Hope that helps
[ March 01, 2004: Message edited by: Mark Vedder ]