Tagged articles
CodeExample
10 articles · Page 1 of 1
The article explains why Java's immutable String class can waste memory when concatenated, introduces the mutable StringBuilder class introduced in J2SE 5.0, demonstrates its usage with code examples comparing memory behavior, shows its length and capacity methods, and illustrates practical operations such as reverse and conversion between String and StringBuilder.
CodeExampleJavaMemoryManagement
0 likes · 7 min read

This article explains how to generate a Java license using TrueLicense, configure key pairs, create the license file, and integrate verification and installation steps into a Spring Boot application, including detailed code examples and deployment considerations for secure software licensing.
CodeExampleJavaLicense
0 likes · 15 min read

This article demonstrates how to wrap EasyExcel within a Spring Boot + MyBatis‑Plus project to provide clean, reusable import and export APIs, covering environment setup, annotation usage, controller implementation, core service design, common pitfalls, and solutions for date and template handling.
BackendCodeExampleEasyExcel
0 likes · 19 min read

This article explains the concept of monkey patching in Python, demonstrates how to replace the built‑in json module with the faster ujson library using a simple runtime patch, and shows performance improvements through code examples and timing tests.
CodeExampleJSONPython
0 likes · 4 min read

This article explains Java's Optional class, showing how to create empty or non‑empty instances, detailing key methods such as get, isPresent, ifPresent, orElse, orElseGet, orElseThrow, map, flatMap, filter, and illustrating practical service‑layer scenarios, JDK 9 enhancements, and when overusing Optional can hurt readability.
CodeExampleFunctionalProgrammingJDK9
0 likes · 10 min read

This article delves into the internal design and execution of Java 8 lambda expressions, dissecting the Stream API pipeline—from source creation through intermediate operations like map and filter to terminal actions such as collect and sum—while illustrating each step with concrete code examples.
CodeExampleConcurrencyJava
0 likes · 14 min read

The article walks through Go 1.18’s new multi‑module workspaces, detailing prerequisites and essential commands, then demonstrates creating a simple “hello” module and a shared library, initializing a workspace with go work, and developing both modules concurrently without committing changes.
CodeExampleGenericsGo
0 likes · 11 min read

This article explains how Spring's BeanUtils.copyProperties performs a shallow copy, outlines scenarios where it is appropriate, compares it with manual setters, and provides Java code examples illustrating its behavior with parent‑child classes and common pitfalls.
BeanUtilsCodeExampleJava
0 likes · 5 min read

This article demonstrates how to refactor channel‑specific processing logic in Java by introducing an abstract rule class, concrete channel rule implementations, and an enum that binds channel identifiers to their rule objects, thereby eliminating cumbersome if‑else statements and adhering to the open/closed principle.
CodeExampleDesignPatternJava
0 likes · 5 min read

This article walks through a step‑by‑step implementation of JavaScript's Promise, covering prototype methods, static helpers like resolve, reject, all, and race, with detailed code examples, execution flow explanations, and a summary of the underlying observer pattern.
CodeExampleJavaScriptPromise
0 likes · 11 min read
