+ 1
Why in this lesson does it say Methods define behaviour when in the last lesson it said Classes define behaviour?
5 Réponses
+ 2
Methods define behavior. Classes or rather objects "have" behavior through methods.
+ 1
they all work hand in hand . Both define behavior
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.
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