Home » Java » Page 5

Java

Migrating to Jakarta EE 9

java-interview-questions-answers

Jakarta EE 9 is out, and with it the namespace change from javax.* to jakarta.*. When we talk about the namespace change, we mostly talk about changing the import statements in your code when migrating to Jakarta EE 9. But there is more to it. I have created a slightly more advanced “Hello, World” application in order to highlight a ...

Read More »

AWS SDK 2 for Java and storing a Json in DynamoDB

java-interview-questions-answers

AWS DynamoDB is described as a NoSQL key-value and a document database. In my work I mostly use the key-value behavior of the database but rarely use the document database features, however  the document database part is growing on me and this post highlights some ways of using the document database feature of DynamoDB along with introducing a small utility ...

Read More »

Parameterized Tests in JUnit 5

A parameterized test allows you to run a test against a varying set of data. If you find yourself calling the same test but with different inputs, over and over again, a parameterized test would help make your code cleaner. To create one in JUnit 5 you need to: Annotate the test method with @ParameterizedTest Annotate the test method with ...

Read More »

Discover Our Range of Geocoding Functionality API Service Capabilities

Helping You Find Your Way with Geocode’s API The Company Behind Geocodeapi SaaS Industries back Geocodeapi. SaaS Industries is an Austrian tech company that develops and supports APIs and SaaS applications. All products are designed and maintained by our team in Vienna. We believe in user-centric development, always aiming to create direct and straightforward solutions. We are continuously improving our ...

Read More »

Introduction to GraalVM (Community Edition): Revolution or Evolution?

1. Introduction Over the last couple of years we have witnessed the astonishing pace and scale of the innovations in the JVM ecosystem. Not only the new JDK release is coming out every 6 months, research and development are accelerating without any signs of lacking directions and features. Table Of Contents 1. Introduction 2. What Is GraalVM? 3. Evolution or ...

Read More »

ThreadLocal in Java – Example Program and Tutorial

ThreadLocal in Java is another way to achieve thread-safety apart from writing immutable classes. If you have been writing multi-threaded or concurrent code in Java then you must be familiar with the cost of synchronization or locking which can greatly affect the Scalability of application, but there is no choice other than synchronizing if you are sharing objects between multiple ...

Read More »

All Your Tests Belong to You: Maintaining Mixed JUnit 4/JUnit 5 and Testng/JUnit 5 Test Suites

If you are seasoned Java developer who practices test-driven development (hopefully, everyone does it), it is very likely JUnit 4 has been your one-stop-shop testing toolbox. Personally, I truly loved it and still love: simple, minimal, non-intrusive and intuitive. Along with terrific libraries like Assertj and Hamcrest it makes writing test cases a pleasure. But time passes by, Java has ...

Read More »

Java Extension Methods

Whither Extension Methods? Apparently, there’s a java dialect called XTend which does this, but there’s no obvious equivalent of extension methods in Java. An extension method, as I recall from C#, allows you to define something like this: 01 02 03 04 05 06 07 08 09 10 11 int myExtensionMethod(SomeClass theExtendee, Object input) {    return ...; } SomeClass myExtendable ...

Read More »