I have a couple of question related to these wrapper classes' methods.
Firstly, why does the method Long (or Integer) take a String as a parameter in the valueOf method? and instead it takes a numeric primitive in the toString method? (see the below examples)
Secondly, why does the second line of code listed below not work (by taking a String as first argument) whereas the first line works fine (by taking a long(or int) as first argument).
Both methods should return the value, respectively in String and in Long type, of the value stated in the first argument converted in the radix specified in the second argument (in this case 8).
String s = Long.toString(80,8)// takes a numeric primitive and it works fine.
Long l = Long.valueOf("80",8)// takes a string as first argument it does not compile,
//(as it was because in radix 8 cannot "read" the number 8
// and therefore it prompts an NumberFormatException.