|
-- Posted by riz at 12:23 pm on Aug. 2, 2006
how do i do validation in java 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
-- Posted by prettyinpink87 at 12:37 pm on Aug. 2, 2006
Use a if statement. if (c != 'X' && c != 'x') System.out.println("Invalid entry. Try again.");
|