🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.owner name
  2. B.balance
  3. C.account number
  4. 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 →