In Java is there a way to find out if first character of a string is a number?
One way is
string.startsWith("1")
and do the above all the way till 9, but that seems very inefficient.
Edit: After the answer, I found out a regex way to do this as well:
s.substring(0,1).matches("[0-9]")