String Length Method Output
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
14
C
7
D
8
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | chunxiangxu.cxu | 5 | 5 | 0m 30s | 470 |
| #2 | bommasam000 | 2 | 3 | 1m 09s | 121 |
| #3 | kaisuki | 1 | 1 | 0m 00s | 100 |
| #4 | lsj08030922 | 1 | 1 | 0m 01s | 99 |
| #5 | zgj07310417 | 1 | 1 | 0m 22s | 78 |
| #6 | Pelisx | 1 | 1 | 0m 56s | 44 |
| #7 | ak.arjunkalra | 1 | 1 | 1m 13s | 27 |
| #8 | raufyildirim95 | 1 | 1 | 2m 37s | -57 |
| #9 | liuwilliam072410 | 1 | 1 | 41m 00s | -2,360 |
Items per page:
10
1 – 9 of 9
APFIVE