hi all,
I found this q. in a book..the o/p of this prog. is
(5,3)(3,5)(5,3)...but I expected it would be(5,3)(3,5)(3,5)
My q. is ..why the x,y value is not changing whereas I am calling the
the odes() method in the main???
Code:
_____________________________________________________
public class ex34
{
public static void main(
String args[])
{
int x=5;
int y=3;
System.out.print("("+x+","+y+")");
odes(x,y);
System.out.print("("+x+","+y+")");
}
public static void odes(int x,int y)
{
int tem;
tem=x;
x=y;
y=tem;
System.out.print("("+x+","+y+")");
}
}
____________________________________________________________
<marquee> Ratul Banerjee </marquee>
*************THANKS IN ADVANCE********************************