-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
  • 24,871
  • 12
  • 85
  • 147
anuj
  • 429
  • 3
  • 7
  • 14

1 Answers1

0

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

Sanjeev
  • 9,876
  • 2
  • 22
  • 33