{"id":642,"date":"2021-07-13T23:33:14","date_gmt":"2021-07-13T23:33:14","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=642"},"modified":"2022-04-30T10:43:11","modified_gmt":"2022-04-30T10:43:11","slug":"what-is-final-finally-and-finalize","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/","title":{"rendered":"What is final, finally and finalize ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"what-is-final-finally-and-finalize\" class=\"color-pink\" style=\"text-align: justify;\">What is final, finally and finalize ?<\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4224 aligncenter\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png\" alt=\"\" width=\"962\" height=\"659\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png 962w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize-300x206.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize-768x526.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize-390x267.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize-820x562.png 820w\" sizes=\"(max-width: 962px) 100vw, 962px\" \/><\/p>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"final\" class=\"color-green\">Final<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Final is used to apply limitations on class, method and variable. Final variable value couldn\u2019t be changed final method couldn\u2019t be overridden and final class can\u2019t be inherited.<\/li>\n<li>Final is a keyword.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"sample-code\" class=\"color-blue\">Sample Code<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<ul style=\"text-align: justify;\">\n<li>Once initialized value of variable cannot be changed.<\/li>\n<\/ul>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-java code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-java code-embed-code\">class A <br\/>{ <br\/>    public static void main(String[] args) <br\/>    { <br\/>        int a = 5; <br\/>  <br\/>        \/\/ final variable <br\/>        final int b = 6; <br\/>  <br\/>         <br\/>        a++; <br\/>  <br\/>        \/\/ modifying the final variable :  <br\/>        b++; <br\/>    } <br\/>} <\/code><\/pre> <\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>If we declare any variable as final, we can\u2019t change its contents since it is final, and if we change it then we have the Compile Time Error.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"finally\" class=\"color-green\">Finally<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Finally is used to place significant code, whether exception is handled or not that time will be executed.<\/li>\n<li>Finally is a block.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"sample-code-2\" class=\"color-blue\" style=\"text-align: justify;\">Sample Code<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-java code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-java code-embed-code\">\/\/ A Java program to demonstrate finally. <br\/>class Wikitechy<br\/>{ <br\/>     <br\/>    static void A() <br\/>    { <br\/>        try <br\/>        { <br\/>            System.out.println(&quot;inside A&quot;); <br\/>            throw new RuntimeException(&quot;demo&quot;); <br\/>        } <br\/>        finally<br\/>        { <br\/>            System.out.println(&quot;A&#039;s finally&quot;); <br\/>        } <br\/>    }  <br\/>    static void B() <br\/>    { <br\/>        try <br\/>        { <br\/>            System.out.println(&quot;inside B&quot;); <br\/>            return; <br\/>        } <br\/>        finally<br\/>        { <br\/>            System.out.println(&quot;B&#039;s finally&quot;); <br\/>        } <br\/>    } <br\/>  <br\/>    public static void main(String args[]) <br\/>    { <br\/>        try <br\/>        { <br\/>            A(); <br\/>        } <br\/>        catch (Exception e) <br\/>        { <br\/>            System.out.println(&quot;Exception caught&quot;); <br\/>        } <br\/>        B(); <br\/>    } <br\/>} <\/code><\/pre> <\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"output\" class=\"color-blue\">Output<\/h2>\n<\/div>\n<\/div>\n<div class=\"Output\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code class=\"hljs bash\" data-lang=\"\"><span class=\"nt\">inside A\r\nA<span class=\"hljs-string\">'s finally\r\nException caught\r\ninside B\r\nB'<\/span>s finally\r\n<\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"finalize\" class=\"color-green\">Finalize<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Finalize is using for the processing of clean up to be perform just before object is garbage collected.<\/li>\n<li>Finalize is a method.<\/li>\n<li>Once finalize method completes immediately Garbage Collector destroy that object.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"syntax\" class=\"color-purple\" style=\"text-align: justify;\">Syntax<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-java code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-java code-embed-code\">protected void finalize throws Throwable<br\/>{<br\/><br\/>}<\/code><\/pre> <\/div>\n<h2 id=\"sample-code-3\" class=\"color-blue\" style=\"text-align: justify;\">Sample Code<\/h2>\n<div style=\"text-align: justify;\">\n<div id=\"bsa-zone_1590522394795-6_123456\">\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">class Wikitechy <br\/>{ <br\/>    public static void main(String[] args) <br\/>    { <br\/>        String s = new String(&quot;RR&quot;); <br\/>        s = null; <br\/>  <br\/>        \/\/ Requesting JVM to call Garbage Collector method <br\/>        System.gc(); <br\/>        System.out.println(&quot;Main Completes&quot;); <br\/>    } <br\/>  <br\/>    \/\/ Here overriding finalize method <br\/>    public void finalize() <br\/>    { <br\/>        System.out.println(&quot;finalize method overriden&quot;); <br\/>    } <br\/>} <\/code><\/pre> <\/div>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"output-2\" class=\"color-blue\">Output<\/h2>\n<\/div>\n<\/div>\n<div class=\"Output\">\n<div class=\"hddn\">\n<figure class=\"highlight\" style=\"text-align: justify;\">\n<pre><code class=\"hljs\" data-lang=\"\"><span class=\"nt\">Main Completes<\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : Final is used to apply limitations on class, method and variable&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4004],"tags":[195,491,360,203,199,214,198,363,209,15937,205,4139,4144,4150,4143,4140,4142,4141,4138,2936,222,196,212,213,4145,4146,4147,4148,286,207,366,204,217,282,4023,483,206,4149,200,197,280,364,4137,968],"class_list":["post-642","post","type-post","status-publish","format-standard","hentry","category-java","tag-accenture-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-atos-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-ciena-corporation-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-dark-horse-digital-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-final","tag-final-class","tag-final-definition","tag-final-keyword","tag-final-keyword-in-java","tag-final-walk-through","tag-final-walk-through-checklist","tag-finally-and-finalize","tag-fis-global-business-solutions-india-pvt-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-infosys-technologies-interview-questions-and-answers","tag-java-final","tag-java-final-variable","tag-java-finally","tag-java-static-final","tag-lt-infotech-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-peoplestrong-interview-questions-and-answers","tag-persistent-systems-interview-questions-and-answers","tag-rbs-india-de-interview-questions-and-answers","tag-reliance-industries-ltd-interview-questions-and-answers","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-static-final","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-what-is-final","tag-wipro-infotech-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is final, finally and finalize ? - Java Interview Questions<\/title>\n<meta name=\"description\" content=\"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn&#039;t be changed final method couldn\u2019t be overridden and final class can&#039;t be inherited.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is final, finally and finalize ? - Java Interview Questions\" \/>\n<meta property=\"og:description\" content=\"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn&#039;t be changed final method couldn\u2019t be overridden and final class can&#039;t be inherited.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T23:33:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-30T10:43:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"What is final, finally and finalize ?\",\"datePublished\":\"2021-07-13T23:33:14+00:00\",\"dateModified\":\"2022-04-30T10:43:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/\"},\"wordCount\":463,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/final-finally-and-finalize.png\",\"keywords\":[\"Accenture interview questions and answers\",\"Applied Materials interview questions and answers\",\"Atos interview questions and answers\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Chetu interview questions and answers\",\"Ciena Corporation interview questions and answers\",\"Collabera Technologies interview questions and answers\",\"dark horse digital interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"final\",\"final class\",\"final definition\",\"final keyword\",\"final keyword in java\",\"final walk through\",\"final walk through checklist\",\"finally and finalize\",\"FIS Global Business Solutions India Pvt Ltd interview questions and answers\",\"Flipkart interview questions and answers\",\"IBM interview questions and answers\",\"Indecomm Global Services interview questions and answers\",\"Infosys Technologies interview questions and answers\",\"java final\",\"java final variable\",\"java finally\",\"java static final\",\"L&amp;T Infotech interview questions and answers\",\"Mphasis interview questions and answers\",\"NetApp interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"PeopleStrong interview questions and answers\",\"Persistent Systems interview questions and answers\",\"RBS India De interview questions and answers\",\"Reliance Industries Ltd interview questions and answers\",\"SAP Labs India Pvt Ltd interview questions and answers\",\"static final\",\"Tech Mahindra interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"Virtusa Consulting Services Pvt Ltd interview questions and answers\",\"Wells Fargo interview questions and answers\",\"what is final\",\"Wipro Infotech interview questions and answers\"],\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/\",\"name\":\"What is final, finally and finalize ? - Java Interview Questions\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/final-finally-and-finalize.png\",\"datePublished\":\"2021-07-13T23:33:14+00:00\",\"dateModified\":\"2022-04-30T10:43:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn't be changed final method couldn\u2019t be overridden and final class can't be inherited.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/java\\\/what-is-final-finally-and-finalize\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/final-finally-and-finalize.png\",\"contentUrl\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/final-finally-and-finalize.png\",\"width\":962,\"height\":659},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is final, finally and finalize ? - Java Interview Questions","description":"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn't be changed final method couldn\u2019t be overridden and final class can't be inherited.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/","og_locale":"en_US","og_type":"article","og_title":"What is final, finally and finalize ? - Java Interview Questions","og_description":"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn't be changed final method couldn\u2019t be overridden and final class can't be inherited.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/","og_site_name":"Wikitechy","article_published_time":"2021-07-13T23:33:14+00:00","article_modified_time":"2022-04-30T10:43:11+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png","type":"","width":"","height":""}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"What is final, finally and finalize ?","datePublished":"2021-07-13T23:33:14+00:00","dateModified":"2022-04-30T10:43:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/"},"wordCount":463,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png","keywords":["Accenture interview questions and answers","Applied Materials interview questions and answers","Atos interview questions and answers","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Chetu interview questions and answers","Ciena Corporation interview questions and answers","Collabera Technologies interview questions and answers","dark horse digital interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","final","final class","final definition","final keyword","final keyword in java","final walk through","final walk through checklist","finally and finalize","FIS Global Business Solutions India Pvt Ltd interview questions and answers","Flipkart interview questions and answers","IBM interview questions and answers","Indecomm Global Services interview questions and answers","Infosys Technologies interview questions and answers","java final","java final variable","java finally","java static final","L&amp;T Infotech interview questions and answers","Mphasis interview questions and answers","NetApp interview questions and answers","Oracle Corporation interview questions and answers","PeopleStrong interview questions and answers","Persistent Systems interview questions and answers","RBS India De interview questions and answers","Reliance Industries Ltd interview questions and answers","SAP Labs India Pvt Ltd interview questions and answers","static final","Tech Mahindra interview questions and answers","UnitedHealth Group interview questions and answers","Virtusa Consulting Services Pvt Ltd interview questions and answers","Wells Fargo interview questions and answers","what is final","Wipro Infotech interview questions and answers"],"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/","name":"What is final, finally and finalize ? - Java Interview Questions","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png","datePublished":"2021-07-13T23:33:14+00:00","dateModified":"2022-04-30T10:43:11+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is final, finally and finalize ? - Final is used to apply limitations on class, method and variable. Final variable value couldn't be changed final method couldn\u2019t be overridden and final class can't be inherited.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-final-finally-and-finalize\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2021\/07\/final-finally-and-finalize.png","width":962,"height":659},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=642"}],"version-history":[{"count":4,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/642\/revisions"}],"predecessor-version":[{"id":4225,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/642\/revisions\/4225"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}