Learn why it’s necessary to close IO streams and how to do it.
Search Results for: Java Classes
Convert int to Long in Java
Learn several ways of convert an integer to a Long in Java.
Java Interface Naming Conventions
This article summarizes naming conventions for Java interfaces, emphasizing the use of adjectives for capability interfaces and nouns for polymorphic interfaces. It provides a practical example and warns against patterns like IUser and UserImpl for code clarity. Adhering to these conventions enhances code readability and maintainability.
Clamp Function in Java
Learn three different methods to implement the clamp function in Java.
Get the Indexes of Regex Pattern Matches in Java
Explore obtaining the indexes of pattern matches within the original input when using a Java regex.
Programmatic Generation of JSON Schemas in Java
Learn how to create JSON Schemas programmatically using the Java JSON Schema Generator library.
Java Weekly, Issue 503
The semantic kernel in Java, GC improvements in Java 21, sealed classes, project Leyden, async-profiler, and GenAI code assistance!
Why There Is No Sorted List in Java?
A quick but comprehensive explanation of why there’s no SortedList in Java.
Java Weekly, Issue 502
JVM computed constants, safepoints, Maven vs Gradle battle, GC improvements, bulk SQL, and effective technology strategies. A good week.
Difference Between Future, CompletableFuture, and Rxjava’s Observable
Discover the difference between Future, CompletableFuture, and Rxjava’s Observable.
Guide to Java Jackson-jr Library
Learn how to read and write JSONs easily with a lightweight Jakson-jr library.
How to Get the Start and End Dates of a Year Using Java
Learn how to get the start and end dates of a year using the modern Date Time API and the old Calendar and Date classes.
Metadata GC Threshold in Java
The Java Garbage Collector plays a part in managing the memory of the metaspace, where information about classes is stored. We look at tuning parameters to help the JVM manage our application.
Stateless Object in Java
Java requires all code to be in classes. Sometimes we may need to create an object with no state in order to help achieve a design pattern. We look at stateless objects and how they function.
Law of Demeter in Java
Learn about the Law of Demeter and understand how to adhere to it in object-oriented code.
How to Get Notified When a Task Completes in Java Executors
Learn several options for receiving notifications on the completion of a task depending on how you’re running it.
Convert One Enum to Another Enum in Java
A quick and practical guide to convert one enum to another.
Getting Yesterday’s Date in Java
Learn how to easily get yesterday’s date in Java.
How to Deep Copy an ArrayList in Java
A quick and practical guide to deep-copying an ArrayList in Java.
How to Read Zip Files Entries With Java
A quick and practical guide to reading zip files in Java.