{"id":408,"date":"2011-08-31T10:55:45","date_gmt":"2011-08-31T09:55:45","guid":{"rendered":"https:\/\/greladesign.co\/blog\/?p=408"},"modified":"2011-09-05T11:20:46","modified_gmt":"2011-09-05T10:20:46","slug":"comparing-strings-in-java","status":"publish","type":"post","link":"https:\/\/greladesign.co\/blog\/2011\/08\/31\/comparing-strings-in-java\/","title":{"rendered":"Comparing Strings in JAVA"},"content":{"rendered":"<p>Hi,<\/p>\n<p>for last few weeks I am doing JAVA programming for Android, and as my background is mainly with ActionScript I wasn&#8217;t aware of JAVA nuances with String comparison, I thought that the equality operator will work i.e. a == &#8220;a&#8221;, but it isn&#8217;t. The String class (java.lang.String) offers comparison methods for that, the ones that I like are: <em>equalsIgnoreCase<\/em> and <em>equals<\/em> as they in result returns boolean value.<\/p>\n<p>best regards<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, for last few weeks I am doing JAVA programming for Android, and as my background is mainly with ActionScript I wasn&#8217;t aware of JAVA nuances with String comparison, I thought that the equality operator will work i.e. a == &hellip; <a href=\"https:\/\/greladesign.co\/blog\/2011\/08\/31\/comparing-strings-in-java\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":""},"categories":[37,111],"tags":[303,95,113,305,112],"_links":{"self":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/408"}],"collection":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/comments?post=408"}],"version-history":[{"count":2,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/408\/revisions"}],"predecessor-version":[{"id":410,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/posts\/408\/revisions\/410"}],"wp:attachment":[{"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/media?parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/categories?post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greladesign.co\/blog\/wp-json\/wp\/v2\/tags?post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}