You can use the static method parseInt(String) in Integer class that will throw an number format exception if you did not pass a numeric String. We can catch the exception and print out the message or return the boolean value.
You can also use the classes listed in this link: https://stackoverflow.com/questions/1102891/how-to-check-if-a-string-is-numeric-in-java
... to use the method, but I don't think it is available in our Eclipse right now.