Calling a Non-void Method

AP Computer Science A· difficulty 3/5

For <code>String s = "hi";</code>, calling <code>s.length()</code> is

  • A

    Instance method call (on s)

    check_circle
  • B

    Constructor

  • C

    Static method call

  • D

    Compile error

Explanation

Instance methods called on object via dot notation.

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

Related questions