Is there a simple way to get Class of a primitive number type from String?
For "42"
the method would return int.class
,
for "25.8"
it would return float.class
, etc...
I only need to check for number types, so the method does not have to be concerned about booleans and bytes.
I am asking, just in case anyone knows about a library method that can do this thing.