Ask your own question, for FREE!
Computer Science 65 Online
SourMunchkin7806:

```c String[] mascots = { "Knights", "Seminoles", "Bulls", "Gators" }; int n = −1; String str = ""; for (String m : mascots) { n = m.indexOf("l") + 2; str += m.substring(n); } System.out.println(str); ``` nssa ightstors nightsssators KnightseslsGators StringIndexOutOfBoundsException occurs

SourMunchkin7806:

So I have no clue where to start here aha

SourMunchkin7806:

How did you do that?

Ultrilliam:

\```language code here \```

Ultrilliam:

three backticks, then the language (optional), then just put your code in between another set of backticks

SourMunchkin7806:

Ohhh ok next time aha...anyways my guess for this would be the third option

Ultrilliam:

Yep that would be correct

SourMunchkin7806:

yesssss

SourMunchkin7806:

Ok i only got like 2 more

Ultrilliam:

Alrighty

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!