private static void rotateLeftOne(char[] arr, int length, int num) { 	int pos = length - num; 	if (pos != length - 1) 	{ 		char temp = arr[pos]; 		arr[pos] = arr[pos + 1]; 		arr[pos + 1] = temp; 		rotateLeftOne(arr, length, num - 1); 	} }

Read more of this post