0

Can I get the array values from middle or any fixed position. for example I have 1000 object in array and now I want to get 1 to 100 and 100 to 200 and so on till 900 to 1000 without loop.

Hanzala
  • 1,965
  • 1
  • 16
  • 43
Imran khan
  • 123
  • 1
  • 12

1 Answers1

2

You can use copyOfRange()

Arrays.copyOfRange(Object[] src, int from, int to)
karan
  • 8,637
  • 3
  • 41
  • 78