Category Archives: 10/9

Blog 4: Final, Finally and Finalize Response

Hello readers, today I read a short blog about the terms in Java known as final, finally and finalize and how they are all different. It is written by guldencirakblog who wrote for the blog known as the java diary.

The first word he talks about out of the three is Finalize. He talks about how finalize is a method shown as Finalize(), and the method is found in the java.lang.Object and it works as a Garbage Collector system only when an object or variable is still not being used anymore. The method with finalize is protected as well but can also be overwritten when you want to dispose a resource in a program.

The second word he talks about is Finally which is a block that is used with try/catch blocks. Finally is usually found at the end of these blocks because it is the final condition for the try/catch block so it passes the test. Finally is very important for exceptions and is key for Java.

The final word(ha see what I did there) is final. Final is used so things such as variables, methods and classes are not changeable. For example, if a variable is like Final String next, then that string cannot be changed after it is declared. For a class if it has Final before it, it doesn’t allow it to be derived.

Now to the reason I choose this blog entry, not only does it apply to Java but it is concepts that my class are familiar with but I don’t know if everyone fully grasps what each one of them does besides maybe final. This blog has helped me understand each of these terms better and may help me apply them later in future programs. The one I was not very familiar with was finalize, I don’t remember if I have ever used it in a program before but it doesn’t seem like the most difficult method to put into a program. Could be helpful to have just to put certain parts of my programs in there. Finally and Final were terms that I definitely remember using before and I definitely can use again after reading this blog and understanding them more. In our classes though, we don’t really ever use final since it really isn’t never needed in our programs and honestly, I haven’t had that much practice with finally but I remember how to use it. I know some of my friends in my class that may benefit from a little refresher with this blog post. Hopefully, sometime this semester I come across a time where knowing these concepts could be very helpful and I would have to thank this blog post for refreshing my memory. Thank you for reading my blog post, tune in next week for another entry.

Source: https://javadiaryalt.wordpress.com/2017/09/25/final-finally-and-finalize-keywords-in-java/

From the blog CS@Worcester – Benderson's Blog by bendersonsblog and used with permission of the author. All other rights reserved by the author.