I wanted to join some string arrays into one. And i used ArrayUtils.addAll(T[], T...)
i found on some answers here. As it is described there, i should just cast it to a String array. When i try to do it, it shows me this error
Cannot store
java.io.Serializable
in an array of java.lang.String atorg.apache.commons.lang3.ArrayUtils.addAll
My code is here
String[] splitLeft=split(left);
String[] middle=new String[]{with};
String[] splitRight=split(right);
String[] inWords=(String[])ArrayUtils.addAll(splitLeft,middle,splitRight);
What is the problem, and how can i fix this?
Ps: with
is just a string.