when u compare two objects, the symbol "==" is used to compare the two points of the objects, not objects. if the objects are basic object type of date, such as "String","Integer", u can use "equals" to compare the objects directly. but if not, u should implement the interface Comparable and the method compareTo() before using "equals". "12341" is a String object. i don't know what is the type of "cnl.item(j).getNodeValue()". check it.
== for low level compare----->compare reference equals() for deep level compare---->compare object that refferene-->it's content
when u compare two objects, the symbol "==" is used to compare the two points of the objects, not objects. if the objects are basic object type of date, such as "String","Integer", u can use "equals" to compare the objects directly. but if not, u should implement the interface Comparable and the method compareTo() before using "equals".
"12341" is a String object.
i don't know what is the type of "cnl.item(j).getNodeValue()". check it.
equals() for deep level compare---->compare object that refferene-->it's content
换成“aaaaaaaaaaaaa"试试