{"id":628,"date":"2012-08-20T18:50:18","date_gmt":"2012-08-20T18:50:18","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=219"},"modified":"2016-09-10T14:58:46","modified_gmt":"2016-09-10T14:58:46","slug":"final","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/final\/","title":{"rendered":"Final"},"content":{"rendered":"<p><strong>Final Modifier Assures that a Reference variable cannot be referenced to a different Object<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n public class Main \r\n {\t\r\n   public int Age;\r\n   public static void main(String args&#x5B;])\r\n   { \t\r\n     final Main objMain = new Main();\r\n     Main objMain2 = new Main();\r\n     objMain = objMain2;\r\n   }\t\r\n }\r\n<\/pre>\n<p>OP:Generates a Exception<br \/>\nThe final local variable objMain cannot be assigned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Final Modifier Assures that a Reference variable cannot be referenced to a different Object public class Main { public int Age; public static void main(String args&#x5B;]) { final Main objMain = new Main(); Main objMain2 = new Main(); objMain = objMain2; } } OP:Generates a Exception The final local variable objMain cannot be assigned.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[100],"tags":[],"class_list":["post-628","post","type-post","status-publish","format-standard","hentry","category-access-modifiers"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=628"}],"version-history":[{"count":1,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/628\/revisions"}],"predecessor-version":[{"id":1600,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/628\/revisions\/1600"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}