I have a custom ArrayList and want to convert it into CharSequence[].
I tried this
List<String> list = Arrays.asList("foo", "bar", "waa");
CharSequence[] cs = list.toArray(new CharSequence[list.size()]);
System.out.println(Arrays.toString(cs)); // [foo, bar, waa]
but it only works for string type.
This is how I solved it,