-2

I have one array, say

String[] a={a,b,c,d,e,f,g}

I want this array in second array but without the first element in the array, for example

String[] b{b,c,d,e,f,g}

How do I achieve this?

Zach Saucier
  • 23,662
  • 12
  • 81
  • 137
anuj
  • 421
  • 3
  • 7
  • 14

1 Answers1

0

You can use System.arrayCopy() (jdk 1.5) or Arrays.copyOfRange() (jdk 1.6+) methods.

Sanjeev
  • 9,798
  • 2
  • 20
  • 33