0
What is the use of using methods ?
6 Answers
+ 1
Basically you can use it everywhere in your code so u need to type less.
And in means of advanced programming methods play a very important role
0
In object oriented programming you have properties for saving variables and methods which do something with the variables. Often you can't reach the variables from outside and need set and get methods therefore.
0
Cant we use the regular method ?
0
What do you mean with a regular method? Do you have an example ?
0
Without seperating it from regular programming. In the example there is a seperate call for the defined object. Cant we call that defined object without seperating it from the main programme. I mean not using static void (something) and then calling it afterwords
0
Regular means no OOP for you? Former times we called methods procedures or functions and it was a kind of structuring your code. Besides you only need to write a procedure/function once if it's called multiple times.