I would like to test whether the string input contains characters other than the alphabet, below is my current code:
< Pre> if ((name.charAt (i)> gt; = 'a' & amp; amp; name.charAt (i) & lt; = 'z') || ((Name.charAt (i) & Gt; = 'A' & amp; amp; name.charAt (i) & lt; = 'z')))
How can I change the code like this Works in the form that if name.charAt (i)
" A
to z
or a
z
?
Do not just take your shape N:
if ((name.chartAut (i)> = 'A' & amp; amp; and name.charAt (i) & lt; = 'z ') || ((name.charAt (i)> = & #
No comments:
Post a Comment