How to Swap two values in java Program

class swp
{
public static void main (String arg[])
{
int x,y,z;
x=5;
y=10;
z=x;
x=y;
y=z;
System.out.print ("X = ");
System.out.println ( x );

System.out.print ("Y = ");
System.out.println ( y );

System.out.print("\n\n\t\tDeveloped by AhsAn....!!\n\n\n");


}





}

0 comments:

Post a Comment