Home » Java » Core Java

Core Java

Frameworks and toolkits to make Java reactive: RxJava, Spring Reactor, Akka and Vert.x overview

Today people want highly responsive, interactive applications with strong user experience, which often means dealing with asynchronicity, especially when the apps are about high-load, real-time data and multi-userness. As Java is an object-oriented language that inherently supports the imperative programming style, asynchronicity is quite a troublesome issue that can turn the code into complete hell. One of the possible ways ...

Read More »

APIs To Be Removed from Java 11

After seeing several APIs removed as part of Java 10, Java 11 (JSR 384) looks to remove some more APIs. In the recent OpenJDK java-se-spec-experts mailing list post “JSR 384 (Java SE 11) PFD Specification posted to jcp.org,” Iris Clark announced the availability of the Java SE 11 (18.9) Proposed Final Draft Specification. This document lists APIs that are being ...

Read More »

How to avoid deadlock in Java Threads?

How to avoid deadlock in Java? is one of the popular Java interview question and flavor of the season for multi-threading, asked mostly at a senior level with lots of follow up questions. Even though question looks very basic but most of the Java developers get stuck once you start going deep. Interview questions start with “What is a deadlock?” ...

Read More »

JDK 12, Merging Collectors, and the Challenge of Naming

It appears likely that a new method will be available on the java.util.streams.Collectors class in JDK 12 that will, according to the new method’s proposed Javadoc-based documentation, “Return a Collector that passes the input elements to two specified collectors and merges their results with the specified merge function.” The currently proposed name of this new Collectors method is pairing, but ...

Read More »

Java Lambda Expressions Tutorial

1. Introduction to Lambda Expressions in Java In this post, we feature a comprehensive Tutorial on Java Lambda Expressions. Lambda Expressions are considered as one of the best features which were introduced in Java 8. Lambda Expressions are considered as Java’s first step into the Functional Programming world. It can be seen as a function which can be created without ...

Read More »

Hands on Java 11’s constantdynamic

With the intention of making the JVM more appealing to dynamic languages, the seventh version of the platform had introduced invokedynamic to its instruction set. Java developers do not normally take note of this feature as it is hidden in Java byte code. In short, by using invokedynamic it has become possible to delay the binding of a method call ...

Read More »

Improve Application Performance with These Advanced GC Techniques

Application performance is on the forefront of our minds, and Garbage Collection optimization is a good place to make small, but meaningful advancements Automated garbage collection (along with the JIT HotSpot Compiler) is one of the most advanced and most valued components of the JVM, but many developers and engineers are far less familiar with Garbage Collection (GC), how it ...

Read More »

Memory-Hogging Enum.values() Method

I’m a big fan of Java’s enum. It seemed like we waited forever to get it, but when we did finally get it (J2SE 5), the enum was so much better than that provided by C and C++ that it seemed to me “well worth the wait.” As good as the Java enum is, it’s not without issues. In particular, ...

Read More »