Input validation in java class
807589Aug 18 2008 — edited Aug 18 2008Hello all,
In my class file i have an input value. I want to check whether that value is null or not. If that value is null i want the user to re enter the value for that input parameter. How its possible. My class file is given below.
"
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String input = bufferedReader.readLine();
"
if input is null then i want him to re enter the value again.
regards
Jithesh PM