There are 2 valueOf methods listed. There are actually 3 valueOf methods.
For example the Integer class has the following: valueOf(String) valueOf(String, radix) valueOf(int)
I think of this table as showing conversion methods from 1 type to another. Some example Integer.valueOf(String) - converts from String to Integer Integer.valueOf(int) - converts from int to Integer
Curiously enough there is another way to make the same conversions as above - that's with constructors. Integer i1 = new Integer(String) - converts from string to Integer Integer i2 = new Integer(int) - converts from int to Integer
posted 9 years ago
Franz, Yes there are actually 3 methods and K&B has mentioned only 2 which are important.By default the radix is 10 for all the valueOf(String string) method unless you specify them. What is the confusion?