Hi,
what is the difference between argument and parameter in java ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Oct 23, 2011, 1:34 AM
Values passed to those variables are called arguments. We are calling using that method with their objects or references or variable values through that class object is called arguments.Example :class sumdemo{public void display(int a,int b,)//Here a and b are parameters.{System.out.println("The values of arguments are: a="+a+"b="+b);}public static void main(String args[]){sumdemo s1=new sumdemo();s1.display(4,6);//Here 4,6 are arguments.}}Thanks
Prabhu RajaPosted Oct 22, 2011, 11:03 PM