|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
check if user input is more than 4 words
How do i check to see if the name a user entered is more than 4 words.
Eg 1:Mr Wayne King James (this name is 4 words so we allow it.) Eg 2:Mr Wayne King James Lone (this name is 5 words so we disallow it.) codes will be very helpful... thanks... pls help asap.. |
|
#2
|
|||
|
|||
|
StringTokenizer, split on the space, get a token count (that's how many words).
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > check if user input is more than 4 words |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|