use like this it will help
String[] subjects = {};
String[] another = {"Physics","Chemistry"};
subjects = another.clone();
or second option do like this
subjects = Arrays.copyOf(another , another .length);
this will copy your another array into your subjects array
5
solved Replacing String array by another [duplicate]