"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.