Limited access

Upgrade to access all content for this subject

Consider the following code.

 String str = "Goodbye";
 char c = str.charAt(7);
 System.out.println(c);

What is printed as a result of executing this code?

A

e

B

"

C

-1

D

The code will not compile.

E

IndexOutOfBounds Exception will be thrown.

Select an assignment template