startsWith using error in java
Posted
by
user1838839
on Stack Overflow
See other posts from Stack Overflow
or by user1838839
Published on 2012-11-21T04:42:21Z
Indexed on
2012/11/21
5:00 UTC
Read the original article
Hit count: 90
java
defined variable:
LinkedList list1=new LinkedList();
Object get()
in list1 obtains a node of list1
Object remove()
in list1 deletes a node of list1
count()
is length of list1
for(int i=1;i<list1.count();i++){
if(list1.get(i).startsWith('"',0)) //Error here
list1.remove(i);
}
Error: cannot find symbol
symbol: method charAt(int)
location: class Object
how to fix this problem? I would like to delete the node in list1 which starts with (").
© Stack Overflow or respective owner