How to check if a String contains number
How to check if a String contains number ? By number I mean it could be positive decimal or whole number.
Here are my possible inputs and possible outputs to explain specifically.
case 1:
Input: String var="abcd"
output: this is not number
case 2:
Input: String var="123"
output: this is a number. This is a whole number
case 3:
Input: String var="123.45"
output: this is number . This is a decimal number
whats the right approach to check this ?