0

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
IMBABOT
  • 37
  • 3

2 Answers2

0
 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

Determine if a String is an Integer in Java

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
-1

You can check each cell in the array for its ascii value.

for exampe: if its between 65-90 its a capital letter

http://www.asciitable.com/