Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  cv
Language: JAVA
Code:
public Class CallByValueTest {

int x = 20, y=30;

public void swap(int a, int b) {
int temp;
temp=a;a=b;b=temp;
s.o.p("a = "+a+"b = "+b);
}

public static void main(String args[]) {

CallByValueTest c = new CallByValueTest();
c.swap(x, y);
s.o.p("x = "+x+"y = "+y);
}
}
}
     
Comments: