+ 2

What is the use of passing the array to method?

23rd Jan 2018, 9:19 AM
Gobinath
2 Respostas
+ 15
here is an simple example to see use of it ☺ sometimes , u want to print array multiple times and at different sections of code , so it will be better to make a method & pass array to it rather than using loops again at different places
23rd Jan 2018, 9:47 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
pls give me small ex program.
23rd Jan 2018, 9:52 AM
Gobinath