执行
String[] rwords = (String[]) list.toArray();
报错[Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
这是强转的时候报错了,改成
String[] words = (String[])(list.toArray(new String[ list.size()]));
执行
String[] rwords = (String[]) list.toArray();
报错[Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
这是强转的时候报错了,改成
String[] words = (String[])(list.toArray(new String[ list.size()]));