← Quiz: What Is OOP: all 10 questions
Quiz: What Is OOP · Question 8 of 10
Which of these is behaviour (a method) rather than state of a BankAccount object?
Which of these is behaviour (a method) rather than state of a BankAccount object?
- A.owner name
- B.balance
- C.account number
- D.withdraw(amount)
Answer & explanation
Correct answer: withdraw(amount)
State is data held in fields; behaviour is what the object can do.
Can you get the rest right without peeking?
Take the timed Quiz: What Is OOP quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →