String Methods

AP Computer Science A· difficulty 3/5

What is the type of value returned by <code>s.charAt(0)</code>?

  • A

    int

  • B

    String

  • C

    char

    check_circle
  • D

    byte

Explanation

<code>charAt</code> returns <code>char</code> primitive.

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

Related questions

AP Computer Science A · String Methods Practice Question | Acemy