Calling Instance Methods - AP Computer Science A

Card 1 of 30

0
Didn't Know
Knew It
0
1 of 3029 left
Question

How do you call an instance method named 'calculate' on an object 'obj'?

Tap to reveal answer

Answer

obj.calculate();. Use dot notation: objectName.methodName();

← Didn't Know|Knew It →