I've got an converting Problem in Java. How can I check if the content of my string matches the data class Integer in Java? As an example: I have a String "Integer", how can I compare if the content of my String matches the Java Type Integer (I don't want an integer data typ, I really want the class).
String value = "Integer";
Integer int_val = 123456;
I would try something like:
value.parseToInteger;
because I want to do something like that:
if(int_val.typeOf(value))
{
...
}
I want to check if it's class Integer because I want to compare my Integer like the example above. But I don't know how to convert the value of my String to a Java Class Type.