Calling Instance Methods
AP Computer Science A · Flashcards · Application
AP COMPUTER SCIENCE A · FLASHCARDS
Card 1
of 12
0 got it
0 to review
Current
Got it
Still learning
Not seen
QUESTION
How do you call the method 'add' with integer arguments 4 and 5 on 'calc'?
QUESTION
Identify the error: 'object.method();' when 'method' requires an argument.
QUESTION
How do you call a method 'update' on 'obj' with 'newValue'?
Tap to flip before you grade
ANSWER
obj.update(newValue);. Standard method call with single argument parameter.
Swipe → got it · swipe ← still learning
Got it
Still learning
Flip Card
Previous card
Next card