LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 591 users online 225292 members 1296 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
EmbraceTheHate
Interests: stuff, drawing, hanging out with fr...
Mood: Confused
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
5 online / 31 MPM
Christmas!
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic validations in java
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
riz Posted 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

Replies
prettyinpink87 Posted at 12:37 pm on Aug. 2, 2006
Use a if statement.

if (c != 'X' && c != 'x')
System.out.println("Invalid entry. Try again.");