How can I check if a String in java has no letters, only numbers? Thank you for the answer
You can use regex: yourString.matches("\\d+")
yourString.matches("\\d+")
\\d means one digit 0-9, + means one or more, combined \\d+ is equal to one or more digit :)
\\d
+
\\d+