class A
{
public static void main(String[] args)
{
int[] arr ={12,5,3,84,54,6,98};
reverse(arr);
for(int i = 0; i < arr.length ; i++)
{
System.out.println(arr[i]);
}
}
public static void reverse(int[] arr)
{
for (int i = 0,int j = arr.length-1;i < j ;i++,j--)
{
int k = arr[i];
arr[i] = arr[j];
arr[j] = k;
}
}
}
{
public static void main(String[] args)
{
int[] arr ={12,5,3,84,54,6,98};
reverse(arr);
for(int i = 0; i < arr.length ; i++)
{
System.out.println(arr[i]);
}
}
public static void reverse(int[] arr)
{
for (int i = 0,int j = arr.length-1;i < j ;i++,j--)
{
int k = arr[i];
arr[i] = arr[j];
arr[j] = k;
}
}
}