java - Unable to add multiple String arrays into array using apache commons ArrayUtils -


i'm trying add multiple string arrays single array using apache commons arrayutils below it's saying unable convert serializable array string array

// assigning strings arrays string str1[] = {"hello"}; string str2[] = {"test1"}; string str3[] = {"test2"}; string str4[] = {"hello"}; string str5[] = {"test4"}; string str6[] = {"hello"};  //joining string arrays      string[] allarrays = arrayutils.addall(str1, str2, str3, str4, str5,str6); 

you can use arrayutils.addall in 2 ways:

    string[] arr1 = {"hello", "bye"};     string[] arr2 = {"good", "bad"};      string[] usage1 = arrayutils.addall(arr1, arr2);     string[] usage2 = arrayutils.addall(arr1, "new item", "another item"); 

the first parameter array. second parameter can either array or single items append first array.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -