Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java array swap

public static void swap(int x, int y, int[] arr) {
  	int temp = arr[x];
  	arr[x] = arr[y];
  	arr[y] = temp;
}
 
PREVIOUS NEXT
Tagged: #java #array #swap
ADD COMMENT
Topic
Name
5+6 =