Wrappers Flashcards
1
Q
What do these methods take as params and what do they return?
Integer.parseInt(“123”)
and the others…
A
They return primitives
They take strings
Boolean takes “true” (ignore case) and any other string = false
They others take string with numeric characters”123”;
2
Q
What is the result?
Integer.parseInt(“a”);
A
Number Format Exception at runtime.
Should have parameter “123”