i want only the user to insert the letters x and X if not to display a message........actually i dont know how to do a validation in java can some one help
12:23 pm on Aug. 2, 2006 | Joined: Jan. 2006 | Days Active: 358 Join to learn more about rizSri Lanka | Male | Posts: 1,443 | Points: 5,300
LiveWire Humor
prettyinpink87
Dairy Product Addict
Use a if statement.
if (c != 'X' && c != 'x') System.out.println("Invalid entry. Try again.");
------- Good morning, and in case I don't see ya, good afternoon, good evening, and good night!
12:37 pm on Aug. 2, 2006 | Joined: July 2006 | Days Active: 106 Join to learn more about prettyinpink87South Africa | BisexualFemale | Posts: 225 | Points: 1,440