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

Recommended Answers

All 3 Replies

Member Avatar for iamthwee

Try using the try ... catch clause. Or write your code so that, it loops back if the users give you an input that is incorrect.

Try using the try ... catch clause. Or write your code so that, it loops back if the users give you an input that is incorrect.

is it a standalone application or a web application ?
One more thing .in which manner you wanna show the error message ?

Try using the try ... catch clause. Or write your code so that, it loops back if the users give you an input that is incorrect.

is it a standalone application or a web application ?
One more thing .in which manner you wanna show the error message ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.