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”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the result?

Integer.parseInt(“a”);

A

Number Format Exception at runtime.

Should have parameter “123”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly