Why in this lesson does it say Methods define behaviour when in the last lesson it said Classes define behaviour? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why in this lesson does it say Methods define behaviour when in the last lesson it said Classes define behaviour?

21st Aug 2016, 6:56 PM
Chris Carr
Chris Carr - avatar
5 Answers
+ 2
Methods define behavior. Classes or rather objects "have" behavior through methods.
22nd Aug 2016, 7:39 PM
Frostbyte
+ 1
they all work hand in hand . Both define behavior
27th Nov 2016, 7:34 PM
Kenneth Agyare
0
you have a very good point, it says they both define behavior although the one that really defines it is methods in my own opinion.
22nd Aug 2016, 11:40 AM
robert
robert - avatar
0
in actual method define behavior and method is also a part of class so class also define behavior because we write methods into a class
3rd Sep 2016, 1:57 PM
Pradeep Saini
Pradeep Saini - avatar