Got String[][] arr
which contains only digit
in String
format.
if (array[i][j].equals("[a-zA-Z]+")){ - not help
How to check if this arr
contains symbol
?
mystring.matches("\\d+");
Returns true when all the chars are digits. This won't break even if the number is greater than the limit of int
.
You can see some other examples here
You can check each cell in the array for its ascii value.
for exampe: if its between 65-90 its a capital letter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.