Hi can someone know how to validate string value in prompt user here's my problem:
1. prompt user ("Do you want to play?:Please enter y or n")
2. condition : if user input y prompt user "lets play"
3. condition : if user input n prompt user "goodbye"
4. if user don't enter y or n continue prompt
plz help i'm new in java....
how to validate string value in javaSimple prompt with condition
Page 1 of 1
4 Replies - 5412 Views - Last Post: 27 September 2010 - 01:37 AM
Replies To: how to validate string value in java
#2
Re: how to validate string value in java
Posted 23 September 2010 - 11:17 PM
Show us what you have tried so far, then we can help you with any problems you might have.
#3
Re: how to validate string value in java
Posted 24 September 2010 - 04:48 PM
Hint- think about a while loop. We're happy to help you with code you wrote.

#4
Re: how to validate string value in java
Posted 24 September 2010 - 06:49 PM
In the order you asked.
1. http://www.java-tips....scanner-3.html
2. http://download.orac...ndbolts/if.html
3. http://download.orac...olts/while.html
1. http://www.java-tips....scanner-3.html
2. http://download.orac...ndbolts/if.html
3. http://download.orac...olts/while.html
#5
Re: how to validate string value in java
Posted 27 September 2010 - 01:37 AM
tnx..it might help...i'll post my code..
Page 1 of 1