Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 2: Using Objects
Start Practice TestPractice Test
About Exam
easy Solved by 11 students

String Length Method Output

Mark
< Prev
Next >

What is printed when the following code is executed?

public class LengthTest {
    public static void main(String[] args) {
        String text = "AP CS A";
        int result = text.length() * 2;
        System.out.println(result);
    }
}
A

13

B

8

C

7

D

14

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1chunxiangxu.cxu55 0m 30s 470
#2bommasam00023 1m 09s 121
#3kaisuki11 0m 00s 100
#4lsj0803092211 0m 01s 99
#5Potter1611 0m 08s 92
#6zgj0731041711 0m 22s 78
#7Pelisx11 0m 56s 44
#8ak.arjunkalra11 1m 13s 27
#9raufyildirim9511 2m 37s -57
#10liuwilliam07241011 41m 00s -2,360
Items per page:
10
1 – 10 of 10

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|