Answer:
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{ public static void swapValues(int[] values)
{int temp= values[0];
values[0]=values[1];
values[1]=temp;
System.out.print(values[0]+" "+values[1]);}
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc= new Scanner(System.in);
int A[] = new int[2];
A[0] = sc.nextInt();
A[1]= sc.nextInt();
swapValues(A);
}
}
Input:-
3 8
Output:-
8 3
Input:-
1 2
Output:-
2 1