Java Advance

Arguments and Parameters

views

02:58
A parameter is a variable which is defined by a method. This variable receives avalue when amethod is called. iN our case “int a1” is the parameter.An argument is the value which is passed to a method at the time of invocation of an object.Here when we say cube(10), that means 10 is an argument.Parameterized method and the program is as follows:-