java - Comparing String with equals -


string site_inclusion = "0;100";  (string inc: site_inclusion.split(";")) {    if(!inc.equals(string.valueof(record.getattrs().get(new pdsxattrkey("siteid")).getvalue()))) {       continue;             } } 

and record.getattrs().get(new pdsxattrkey("siteid")).getvalue() returns 77

so code should going continue block right? not going continue?

any suggestions?

i suggest simplify code test what's going on. might have made mistake trying build example.

string site_inclusion = "0;100";  (string inc: site_inclusion.split(";")) {     string temp = string.valueof(record.getattrs().get(new pdsxattrkey("siteid")).getvalue());     if(!inc.equals(temp)) {         system.out.println(inc + " != " + temp);         continue;     }     system.out.println(inc + " == " + temp); } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -