?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Print Goofy Output Using Strings and Integers

APCSA-KVKVEV

Consider the following code segment.

String goofy = 1234%10+(1234+"").length()+"goofy".length()+"";
System.out.println(goofy);

What is printed as a result of executing the code segment?

A

4

B

9

C

13

D

1243

E

An error occurs.