I have an array and now I want to create a copy of that array so that I can retain the previous values of my array if I want to.

I tried something like this:

```
System.arraycopy(firstArray, 0, secondArray, 0, firstArray.length);

```

But it is giving me a `NullPointerException`, i.e.:

```
08-26 13:20:08.421: E/AndroidRuntime(23739): FATAL EXCEPTION: main
08-26 13:20:08.421: E/AndroidRuntime(23739): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.iweentravel/com.android.iweentravel.MainAcvtivity}: java.lang.NullPointerException: dst == null
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread.access$600(ActivityThread.java:149)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.os.Handler.dispatchMessage(Handler.java:99)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.os.Looper.loop(Looper.java:153)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread.main(ActivityThread.java:4987)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at java.lang.reflect.Method.invokeNative(Native Method)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at java.lang.reflect.Method.invoke(Method.java:511)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at dalvik.system.NativeStart.main(Native Method)
08-26 13:20:08.421: E/AndroidRuntime(23739): Caused by: java.lang.NullPointerException: dst == null
08-26 13:20:08.421: E/AndroidRuntime(23739):    at java.lang.System.arraycopy(Native Method)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at com.android.iweentravel.MainAcvtivity.onCreate(MainAcvtivity.java:99)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.Activity.performCreate(Activity.java:5020)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
08-26 13:20:08.421: E/AndroidRuntime(23739):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
08-26 13:20:08.421: E/AndroidRuntime(23739):    ... 11 more

```

Please suggest how I could properly create a copy of an array.