- 1
What is the advantage of using method over a veriable
What is the advantage of using method over a veriable
2 odpowiedzi
0
If you mean advantage of variable them
1-save time
For example you want to use 133.045 them you don't want to type again and again
The whole thing is make your program
2-easy to read and easy to use
For example you wrote program 100 lines them you don't want to remember everything right?
And
3-make your program reusable
0
swamy
First thing is both are used for different purpose so I don't think there is any comparison.
variable is used to store value, it can be any type of value like integer, string, float
and method is used to perform a task and it can be use for reusable code also. Method save your time for example if you are going to perform same task again and again then methods are useful.