Question : Checking for only numbers if statement
Answered by :
if (text.matches("[0-9]+"){ // your operations
}
Source : https://stackoverflow.com/questions/10575624/java-string-see-if-a-string-contains-only-numbers-and-not-letters | Last Update : Wed, 29 Dec 21