String Methods

AP Computer Science A· difficulty 3/5

<code>"abcdef".substring(2)</code> returns

  • A

    bcdef

  • B

    abcdef

  • C

    abc

  • D

    cdef

    check_circle

Explanation

<code>substring(start)</code> returns from index <code>start</code> to end; index 2 is 'c'.

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

Related questions