{"id":174,"date":"2003-01-13T13:15:00","date_gmt":"2003-01-13T18:15:00","guid":{"rendered":"http:\/\/crazedmonkey.com\/blog\/uncategorised\/0090.html"},"modified":"2006-10-15T19:23:06","modified_gmt":"2006-10-16T00:23:06","slug":"0090","status":"publish","type":"post","link":"http:\/\/crazedmonkey.com\/blog\/programming\/0090.html","title":{"rendered":"Things you shouldn&#8217;t be able to do in Java #312"},"content":{"rendered":"<p>The Fishbowl: <a title=\"When is a constant not a constant?\" href=\"http:\/\/fishbowl.pastiche.org\/archives\/001218.html\">When is a constant not a constant?<\/a>. Charles Miller posts one of those &#8220;Guess what this code does&#8221; challenges, and it&#8217;s in Java. I prayed that I wasn&#8217;t right, but was sickened when I ran the code and discovered the worst. Ugh. I&#8217;m not <em>all that<\/em> surprised as <var>sittingDuck<\/var> is not <em>really<\/em> a constant, more like a variable which has been initialised to a specific value. Actually, scratch that. I just tried declaring <var>sittingDuck<\/var> as <code>final<\/code> and it still works as before. So much for objects as constants.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Fishbowl: <a title=\"When is a constant not a constant?\" href=\"http:\/\/fishbowl.pastiche.org\/archives\/001218.html\">When is a constant not a constant?<\/a>. Charles Miller posts one of those &#8220;Guess what this code does&#8221; challenges, and it&#8217;s in Java. I prayed that I wasn&#8217;t right, but was sickened when I ran the code and discovered the worst. Ugh. I&#8217;m not all&nbsp;&hellip;&nbsp;<a class=\"read_more\" href=\"http:\/\/crazedmonkey.com\/blog\/programming\/0090.html\" rel=\"bookmark\" title=\"Continue reading &ldquo;Things you shouldn&#8217;t be able to do in Java #312&rdquo;\"><span>Read more<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[4,9,2],"tags":[],"_links":{"self":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/174"}],"collection":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":0,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"wp:attachment":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}