+ 1

What are java arguments...m always confused

23rd Jan 2021, 10:16 AM
Shruti
Shruti - avatar
4 Réponses
+ 3
I am guessing you are talking about arguments used in functions, if yes then they are just values passed to a function that has some parameters defined. Like say public void add(a, b){ Int sum=a+b; System.out.print(sum); } add(4,5); Here 4 and 5 are arguments and a and b are parameters.
23rd Jan 2021, 10:49 AM
Abhay
Abhay - avatar
23rd Jan 2021, 10:49 AM
Atul [Inactive]
+ 1
The values that are passed in the parameters are called as arguments
23rd Jan 2021, 10:47 AM
Atul [Inactive]
+ 1
You basically pass arguments and accept parameters.
23rd Jan 2021, 3:15 PM
Avinesh
Avinesh - avatar