存在类转换问题。请告诉我如何铸造这个。我想ArrayList<CharSequence>
在我CharSequence[]
命名的Contacts
.
java.lang.ClassCastException
(在安卓中):
CharSequence[] Contacts;
List<CharSequence> contacts = new ArrayList<CharSequence>();
Contacts = (CharSequence[]) contacts.toArray();
for(CharSequence p : contacts) {
Log.i("log_tag", "AAAAAAAAAAAAAAAAAAA" + p);
}