In your java journey sometimes you confuse about these three final words. but now we remove this confusion in this article. so lets go differentiate these three terms. What is final, finally and finalize in simple terms? Final :- Final is keyword in java. final means it can not be changeable. We can use final keyword in following three cases:- Final Class Final Variable Final Method If we declare class as final then we can not extends that class. if we try to extends final class then we get error. If we declare variable as final means we can not reassign its value means we can not change if we declare variable final. And last id we declare method as final then we can not override that methods. means can not overridden final method. I created full article about Final keyword in java you can check here. FINAL KEYWORD IN JAVA Finally :- Finally is block in java. It is simple block. Finally { // Finally block System.out.print("In finally block"); }
Welcome To Programming Tutorial. Here i share about Java Programming stuff. I share Java stuff with simple examples.