I need to get the value of a field using reflection. It so happens that I am not always sure what the datatype of the field is. For that, and to avoid some code duplication
Oddly enough I found that if you parse from a string it works.
int i = 0; Long l = Long.parseLong(String.valueOf(i)); int back = Integer.parseInt(String.valueOf(l));
Win.