Ask your own question, for FREE!
Computer Science 18 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!
Latest Questions
HeyItsAlicia: Mits midnight!!! Happy 16th bday to me !!
3 minutes ago 16 Replies 4 Medals
XShawtyX: Art
4 hours ago 1 Reply 1 Medal
RAVEN69: My drawing so far is actually fire
1 week ago 9 Replies 2 Medals
PureSoulless: is staying at your friend's house while you're homeless legal.
2 weeks ago 5 Replies 1 Medal
whyjustwhy: i did that one TV girl trend with blake (aka @ShadowKid3)
1 week ago 12 Replies 2 Medals
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!