116k views
4 votes
3. What is output by the following code?

str1 "awesome"
str2 "leopard";
int i = 3;
int j = str2.length() - 3;
while (i < str1.length() &8 j > 0)
System.out . print (strl.substring(i, i + 1));
System.out.print(str2.substring (j, j + 1);
1++;
j--;
a. saopmoee
b. saompoeel
C.
saerwd
aspoomee
Nothing is printed because there is an out of bounds error
e,

User MahdeTo
by
5.2k points

1 Answer

1 vote

Answer:

B I think

Step-by-step explanation:

User Ndsc
by
5.1k points