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