Ever Since Java allows using String variables in switch and case statements, there are many programmers using this feature in code, which can be better written using integer and enum patterns. This was one of the popular features of the JDK 7 release, including automatic resource management and multi-exception catch blocks. Though I upfront didn't like this feature because of the better alternatives available in terms of using the enumeration type, I am not totally against this feature. One reason for this is convenience and given usage of String in Java program, it's quite handy as well, but I prefer to learn more before using any new feature in production code.
Thursday, June 26, 2025
Friday, May 26, 2023
How to use Fork Join in Java Multithreading - Tutorial with Example
What is fork Join framework in Java: Already popular project coin of JDK7 release has presented a lot of good features e.g automatic resource management, string in switch case, better exception handling in JDK7, etc. Another important feature to note is fork-join as the name implies it divides one task into several small tasks as a new fork means child and joins all the forks when all the sub-tasks are complete.
Labels:
core java
,
Java 7
,
Java multithreading Tutorials
Sunday, August 8, 2021
How to use ARM- Automatic resource management in Java - Try with Resource Example
ARM automatic resource management is another attractive features of Java 7 and project coin. As name itself implies that now JVM is going to be handling all the external resources and make programmers free to bother about resource management. If my java programmers use any external resources like file, printer or any devices to close after my program execution complete. Normally we close the resources which we have open in beginning of our program or we decide that if program finish normally how to manage the resource or if our program finish abnormally how to close the resource.
Subscribe to:
Comments
(
Atom
)