DOUBT IN SWAP FUNCTION

Ma’am I’ve directly done swap like this. What’s the use of SwapFunction then? //SWAPPING AN ARRAY public class SwapFunctionArray { public static void main(String[] args) { int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; int i = array[3]; int j = array[8]; System.out.println(“:point_down::point_down:Without swapping​:point_down::point_down:”); System.out.println(i + “,” + j); int a = i; i = j; j = a; System.out.println(“:point_down::point_down:After swapping​:point_down::point_down:”); System.out.println(i + “,” + j); } }