Looking for something else? Check the categories of Java:
Class loading Garbage Collection Google Guava Hibernate Java Java 8 Java bytecode Java collections Java concurrency Java I/O Java Instrumentation Java memory model JPA JUnit Maven Monitoring Off-heap Play Framework Spring Data JPA Spring framework Spring Integration Spring security Spring Web MVC Tomcat
If not, below you can find all articles belonging to Java.
In one of the homework of my Become a Data Engineer course I'm asking students to normalize a dataset. In the dataset a date time field has different supported formats. When I was analyzing the possible solutions, I found a class I've never met before, the DateTimeFormatterBuilder. And it will be the topic of this post.
Maybe you didn't like my clickbait title but wanted to test my creativity with it ;) And more seriously, in this post I will cover streams but the ones that you're using in your Scala/Java code rather than the distributed ones provided by Apache Kafka. And I decided to write that because by analyzing a lot of Spark I/O method, I meet streams everywhere and I wanted to shed some light on them.
That's the next post I wrote after my unsuccessful analysis of Apache Kafka source. When I was reading the part responsible for sending requests to the broker, I found that it was partially managed by a Java package that I've never seen before. And that will be the topic of this post.
Last time I was writing a post about the "whys" of code generation. And I found a lot of points related to JVM JIT optimizations. This time I will show what kind of optimization the JVM is capable of at runtime.
During my analysis of Apache Spark and Apache Beam projects I've discovered the use of ServiceLoader - a Java's util class used to load other classes dynamically.
Java Mission Control (JMC) described in previous post comes with another tool helping to understand what happens in the JVM. This tool is the Java Flight Recorder (JFR).
Historically JVisualVM was one of Oracle references to monitor the state of the JVM. However the 7th version of Java brought an alternative called Java Mission Control.
Java programmers are often limited in their thoughts to heap management and it's justified. JVM offers the possibility to code without taking care about manual objects allocation and deallocation. But, as JVM-based language programmer, at least for personal knowledge, it's good to know that on heap memory is not the single memory storage solution in JVM applications. The complement memory is off-heap.
Often we think that if something is from "concurrent" package, it's automatically thread-safe. By definition is true, but the definitions rarely make the applications and through this post we'll see why.
Javassist is a very useful library to manipulate bytecode in Java. In intuitive way it allows to access class members and change their behaviour - as well in source-code level as in bytecode one.
During reading Thread documentation I found a class that existence I've ignored until now - LockSupport. Some of its methods influence Thread states, so it was quite natural choice for the topic of next posts.
JIT is a tool plenty of magic, often considered by programmers as too low level to take them into account. But a lot of this magic stuff has a great influence on coding practices. One of them concerns methods size and is called inlining.
Simply speaking a thread goes from created to terminated state, passing by the execution phase. However in practice it's not so simple because some other steps can occur during execution
Most of time threads manipulation is limited to programming language. Even if this high abstraction is sufficient, it's also good to know what happens under-the-hood when a new thread is created in any programming language (Java in the case of this post).
Garbage Collection in Java has a lot of advantages over manual deallocation of objects. But sometimes its automatic character makes that some of programmers neglect the aspect of objects lifecycle management.
Possibility to specify fetching of child entities is quite nice JPA feature. However, it was limited to either define the fetching as LAZY or EAGER. Fortunately, only prior to JPA 2.1.
The risk of InterruptedException appears very often in multi-threading environment. As a declared exception, it must be defined either in method signature or caught in try-catch block. However, it must be done in some correct way.
Understanding if given object is passed by value or by reference is important to write efficient programs. Which is the strategy in Java ?
As other programming components, data access layer has also its own patterns and anti-patterns. One of the most famous examples of anti-patterns is called select n+1.
JUnit is an incontestable part of each Java project. Step by step this framework comes closer to its new major version - 5.