Here is a java line of code that i have failed to understand.
String line = "Some data";//I understand this line
int size;//I understand this line too
size = Integer.valueOf(line,16).intValue();//Don't understand this one
What i know is Integer.ValueOf(line) is the same as Integer.parseInt(line) , is not so? Correct me if i am wrong; Thanks.
Integer.ValueOf(line,16)converts string valuelineinto anIntegerobject. In this case radix is 16.intValue()gets theintvalue from theIntegerobjectcreated above.Furthermore, above two steps are equivalent to
Integer.parseInt(line,16).In order to get more INFO please refer Java API Documentation of Integer class.