public static void swap(int x,int y) 
    {
     int temp=x;
     x=y;
     y=temp;
         }上面这个是用java描述的算法,我不理解问题的意思,
我又写了这个,就可以运行了,public class swap {
    
    public static void main(String[] args) 
    {
    
     int x,y,temp;
     x=Integer.parseInt(args[0]);
     y=Integer.parseInt(args[1]);
     temp=x;
     x=y;
     y=temp;
     System.out.println("x="+x+"\n"+"y="+y+"\n");
    }
}