In that case you can make Regex pattern and check if contains only number form [0-9] means int. If contains Alphabet from [A-Za-z0-9] and other special character then String. If input contains [0-9] with (DOT .) then float. you can set it according to your requirement.
Important question: what is "0"? Is it:
a) a byte
b) a short
c) a char
d) an int
e) a long
f) a float
g) a double
h) all of the above
These kinds of decisions are very important; do you always take int if possible, ignoring byte and short? Is char only every 1-character String that is not a digit?