Java Catch Multiple Exceptions, Rethrow Exception – Tutorial
Java Catch Multiple Exceptions, Rethrow Exception – Tutorial In Java 7, the catch block has been improved to handle multiple exceptions in a single catch block. If you are catching…
Java Callable Future Example
Java Callable Future Example Java Callable and Future are used a lot in multithreaded programming. In last few posts, we learned a lot about java threads but sometimes we wish…
Java break statement, label – Tutorial
Java break statement, label – Tutorial There are two forms of break statement – unlabeled and labeled. Mostly break statement is used to terminate a loop based on some condition,…
Java BlockingQueue Example
Java BlockingQueue Java BlockingQueue doesn’t accept null values and throw NullPointerException if you try to store null value in the queue. Java BlockingQueue implementations are thread-safe. All queuing methods are…
Java append to file – Tutorial
Java Append to File We can append to file in Java using following classes. FileWriter Java append content to existing file using BufferedWriter Append text to file in Java using…
Java Annotations – Tutorial
Java Annotations Java 1.5 introduced annotations and now it’s heavily used in Java EE frameworks like Hibernate, Jersey, and Spring. Java Annotation is metadata about the program embedded in the…
Java Access Modifiers – Tutorial
Java Access Modifiers We can use java access modifiers with Classes as well as Class variables and methods. We are allowed to use only “public” or “default” access modifiers with…
Java 8 Interface Changes
Java 8 Interface Changes Designing interfaces have always been a tough job because if we want to add additional methods in the interfaces, it will require change in all the…
Java 15 Features – Overview
Java 15 Features – Overview Here’s a quick look at features that are a part of Java 15: Sealed Classes (Preview) – JEP 360 Pattern Matching for instanceof (Second Preview)…