what is the difference between object.add( new Integer(3));
and object.add(new Integer("3");
Printable View
what is the difference between object.add( new Integer(3));
and object.add(new Integer("3");
"3" is a String and 3 is an int.
Read the API doc for the class to see what types of values are allowed in the class's constructor.