0

What is the use of using methods ?

27th Oct 2018, 3:36 PM
Tony Tomey Jose
Tony Tomey Jose - avatar
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
27th Oct 2018, 4:17 PM
Seniru
Seniru - avatar
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.
27th Oct 2018, 3:50 PM
Mirko Klotzsche
Mirko Klotzsche - avatar
0
Cant we use the regular method ?
27th Oct 2018, 3:51 PM
Tony Tomey Jose
Tony Tomey Jose - avatar
0
What do you mean with a regular method? Do you have an example ?
27th Oct 2018, 3:52 PM
Mirko Klotzsche
Mirko Klotzsche - avatar
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
27th Oct 2018, 3:56 PM
Tony Tomey Jose
Tony Tomey Jose - avatar
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.
27th Oct 2018, 4:04 PM
Mirko Klotzsche
Mirko Klotzsche - avatar