Calling a Void Method

AP Computer Science A· difficulty 3/5

Given <code>Dog d = new Dog("Rex");</code>, you call its bark method by

  • A

    bark.d()

  • B

    d.bark()

    check_circle
  • C

    Dog.bark()

  • D

    d->bark()

Explanation

Instance method via dot notation; static would use <code>Dog.method()</code>.

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

Related questions