LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 540 users online 224775 members 776 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
xoxomesmerizedxoxo
Favs: movies: scary nd comdies
Mood: Excited
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
4 online / 28 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Adding Reply
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.");