| preferred AP College board partner for AP classes
AP Computer Science A/Unit 7: ArrayList
Start Practice Test
Share
easy Solved by 9 students
Integer Wrapper Class and intValue Method
< Prev
Next >

Which of the following code segments correctly demonstrates the creation of an Integer wrapper object and the subsequent retrieval of its primitive int value using the intValue method?

A

Integer num = new Integer(5); int a = num.intValue();

B

Integer num = new Integer(5); int a = num.getIntValue();

C

int num = new Integer(5); int a = num.intValue();

D

Integer num = 5; int a = num.getInt();

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1ponneban00035 1m 41s 179
#2kaisuki12 0m 00s 90
#3aditirajaraman1027200811 1m 01s 39
#4geethasailaja14 2m 18s -68
#5y.seong202713 4m 32s -192
#6singhris00012 17m 01s -931
APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy