String Methods

AP Computer Science A· difficulty 4/5

<code>"a,b,c".split(",")</code> returns

  • A

    ["a,b,c"]

  • B

    ["abc"]

  • C

    Compile error

  • D

    ["a", "b", "c"]

    check_circle

Explanation

<code>split</code> returns an array of substrings between matches.

Want 10 more like this — adaptive to your weak spots?

Related questions