Home » Java

Java

All You Need To Know About Exception Handling In Selenium

In the world of technology, exceptions are said to be as old as programming itself. Occurrence of an exception during the execution of code can result in unexpected behaviour unless the exception is properly handled in the code. Exceptions are not bad, but are a fundamental part of modern programming. Rather than having a fear of exceptions, it is important ...

Read More »

Executing Blocking calls on a Reactor based Application

spring-interview-questions-answers

Project Reactor is a fully non-blocking foundation with back-pressure support included. Although most libraries out there support asynchronous methods thus assist on its usage, there are some cases where a library contains complex blocking methods without an asynchronous implementation. Calling this methods inside a reactor stream would have bad results. Instead we need to make those method to async ones ...

Read More »

Performance impact of java.lang.System.getProperty()

‘java.lang.System.getProperty()’ is a common API used by Java developers to read the System properties that are configured during application startup time. i.e. when you pass “-DappName=buggyApp” as your application’s startup JVM argument, the value of the ‘appName’ system property can be read by invoking the ‘java.lang.System.getProperty()’. Example: public static String getAppName() { String app = System.getProperty("appName"); return app; } When ...

Read More »

KivaKit Microservices

java-interview-questions-answers

KivaKit Microservices   KivaKit is designed to make coding microservices faster and easier. In this blog post, we will examine the kivakit-microservice module. As of this date, this module is only available for early access via SNAPSHOT builds and by building KivaKit. The final release of KivaKit 1.1 will include this module and should happen by the end of October, ...

Read More »

Chasing Java’s release train: JDK-17, the next big thing

Here we go, JDK-17, the next LTS release, just became generally available. It is an important milestone for the OpenJDK for years to come but sadly, Project Loom, the most anticipated improvement of the JVM platform, was not able to make it, despite the extraordinary progress being made. Well, if you are still on JDK-8, like the majority of us, ...

Read More »

Google Cloud Deploy – CD for a Java based project

This is a short write-up on using Google Cloud Deploy for Continuous Deployment of a Java-based project.  Google Cloud Deploy is a new entrant to the CD space. It facilitates a continuous deployment currently to GKE based targets and in future to other Google Cloud application runtime targets. Let’s start with why such a tool is required, why not an ...

Read More »

Signaling and waiting for concurrent state changes

java-interview-questions-answers

Java’s concurrency library (java.util.concurrent) provides a mutual-exclusion (mutex) Lock called ReentrantLock. This lock maintains a queue of threads that are waiting to own the lock, allowing access to a protected resource. A thread can be added to the lock’s wait queue by calling lock(). When the lock() method returns, the thread will own the lock. Once the thread obtains the ...

Read More »

More Frequent Java Long-Term Releases

A little over four years ago, Mark Reinhold (Chief Architect of the Java Platform Group at Oracle) stated in his blog post “Moving Java Forward Faster“: “For Java to remain competitive it must not just continue to move forward — it must move forward faster.” In that post, Reinhold proposed “that after Java 9 we adopt a strict, time-based model with a ...

Read More »

JDK 18: Code Snippets in Java API Documentation

OpenJDK 18 Early-Access Build 16 (2021/9/23) is now available and includes the implementation for JEP 413 (“Code Snippets in Java API Documentation“), which is targeted for JDK 18. The objective of JEP 413 is to “introduce an @snippet tag for JavaDoc’s Standard Doclet, to simplify the inclusion of example source code in API documentation” and the JEP itself covers the ...

Read More »