I have array list named intArray. I need to get sublist of that arraylist and i know there is a method which takes two parameters: starting index and count. But i wanna implement a method by taking two parameters: lower index and higher index. Is there any way to do like this?
For e.g this is the arraylist :
int[] intArr = { 1, 2, 3, 4, 5, 6 };
So if we specify a method for e.g displayArray(1,4) //1 is lower index and 4 is higher index. so it should display elements from 1st index to 4th index.
Thanks!!!