Thursday, 15 May 2014

java - Converting charAt check 'containing A-Z' to 'not containing A-Z' -


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