Question OOP-CLS-0004
EasyWhat is a method?
- A.
A variable inside a class
- B.
A class with no data
- C.
Show answer and explanation
Answer: D
Methods act on an object's data, for example account.deposit(500).
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
What is a method?
A variable inside a class
A class with no data
Answer: D
Methods act on an object's data, for example account.deposit(500).
A loop in a class
A function defined inside a class that describes an object's behaviour