View Single Post
Old Apr 5th, 2008, 1:53 AM   #8
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Java Entering a Number or Letter

You need to use the equals method when comparing Strings in Java. Replace str == "1" with str.equals("1").
titaniumdecoy is offline   Reply With Quote