Java Finally Block – When it is not executed ?

The finally block in Java is used to define a section of code that will always be executed, regardless of whether an exception is thrown or caught. However, there are certain conditions under which the finally block may not execute. In this tutorial, we’ll explore these conditions and provide some code snippets to illustrate them. Hint: read it through as this is a common interview question!

Read more

How to solve

If you’re encountering the “handshake_failure through SSLHandshakeException” error, it means there is an issue with the SSL/TLS handshake between the client and server. This can be caused by a variety of reasons such as outdated SSL/TLS protocol version, missing SSL/TLS certificates, or incorrect SSL/TLS configurations.

Read more

JBang: Create Java scripts like a pro

JBang is a scripting tool which allows to run Java application with minimal set up, without the need of having a project configuration. In this tutorial we will learn how to use it to run a simple Java application and then we will be looking at a more complex example, which starts a Quarkus application.

Read more

Two ways to read a File in a String with Java

Do you need to read a File into a String in Java ? This article will show two simple ways to achieve it. By the end of it, you will also learn the differences between each solution. Solution #1 Use Files.readAllBytes The first solution, which reads a file into an array of Bytes, uses the … Read more

How to solve the error “invalid target release: 17”

This article shows how to fix the compilation issue that you can hit when the target Java release specified in your Maven configuration does not match the version of Java installed on your system. For example, your environment uses Java 11 but your Maven configuration requires Java 17.

Read more