SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

TEXT PACKAGE / NOTES</>↗
Text Package06 Feb 2024

How do I format a number as percentage with fraction digits?

In Java, the NumberFormat class of java.text package can be used to format numbers. For formatting a number as a percentage string with fraction digits, you can use the getPercentInstance() method that returns a percentage format for the current default Locale. Here is a sample code snippet showing how to format a number as a […]

Wayan · 3 min read
ITEXT PDF / NOTES</>↗
iText PDF05 Feb 2024

How do I create a table in PDF document using iText 8?

When it comes to generating PDF documents dynamically, iText 8 is a powerful and versatile Java library that provides a wide range of functionalities. One common requirement in PDF generation is the need to include tables to present structured data. In this blog post, we will explore how to create a table in a PDF […]

Wayan · 3 min read
UTIL PACKAGE / NOTES</>↗
Util Package27 Jan 2024

How do I use ConcurrentHasMap forEach() method?

The forEach() method in ConcurrentHashMap is used for iteration over the entries in the map. The method takes a BiConsumer as an argument, which is a functional interface that represents an operation that accepts two input arguments and returns no result. Here’s an example of how to use forEach() with a ConcurrentHashMap: package org.kodejava.util.concurrent; import […]

Wayan · 2 min read
UTIL PACKAGE / NOTES</>↗
Util Package26 Jan 2024

What is ConcurrentHashMap and how do I use it in Java?

The ConcurrentHashMap is a class in Java that implements the ConcurrentMap interface. It is part of the Java Collection Framework and extends the AbstractMap class. ConcurrentHashMap is thread-safe, which means it is designed to support high concurrency levels by handling multiple threads concurrently without any inconsistencies. It allows multiple threads to perform retrieve (get) and […]

Wayan · 4 min read
JAVA PERSISTENCE API / NOTES</>↗
Java Persistence API26 Jan 2024

Impact on using Spring Data native query @Query to Persistence Context?

Using Spring Data’s @Query annotation with native SQL queries can have several impacts on Hibernate or JPA persistence context: Bypassing JPQL Translation: When you use a native SQL query with @Query, you bypass JPQL (Java Persistence Query Language) translation. This means that the query is written in the native SQL dialect of the underlying database, […]

Wayan · 3 min read
JAVA PERSISTENCE API / NOTES</>↗
Java Persistence API26 Jan 2024

Do we need to explicitly call save() method in Hibernate or JPA to save entities?

No, you typically don’t need to explicitly call the save() method in Hibernate or JPA to save entities. In JPA, when you modify a managed entity (an entity that was retrieved or persisted by the entity manager), the changes are automatically synchronized with the database when the transaction commits. Hibernate, being an implementation of JPA, […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.