is there a way to cast any String automatically to its primitive data type in Java? For example having a List with 10 Strings:
string1 = "1234"
string2 = "12.34"
string3 = "String"
string4 = "0.53"
...
I would like to hand them all in a method and get the value back converted in its correct data type (Float, Integer, String):
int1 = 1234
float1 = 12.34
string1 = "String"
float2 = 0.53
...