Java Reflection: Modifying Private Static Final Fields
While debugging memory leaks, I often need to modify field values via reflection. I came across a great Stack Overflow answer worth documenting. ...
While debugging memory leaks, I often need to modify field values via reflection. I came across a great Stack Overflow answer worth documenting. ...
This article is compiled from the official Gson User Guide. Gson’s performance is competitive with other JSON frameworks, and being Google-maintained makes it a solid choice for Java/Android JSON processing. Gson is a Java library developed by Google for serializing Java objects to JSON and deserializing JSON strings back to Java objects. ...
Cache replacement policies determine which entries to evict when the cache is full. They have a direct impact on system performance. Here is an overview of common cache eviction algorithms. ...
Design Patterns are reusable solutions to common problems in object-oriented design. The 23 classic patterns were systematized by the Gang of Four (GoF: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides) in their 1994 book Design Patterns: Elements of Reusable Object-Oriented Software. This article is compiled from a blog post by smallnest and a StackOverflow discussion on GoF design pattern implementations in the Java API. View PDF Overview ...
HashMap is one of the most frequently asked topics in Java interviews — it effectively tests a candidate’s understanding of data structures and engineering trade-offs. This article breaks down its core design and implementation details. ...
What is a Lambda Expression? Lambda expressions are a core feature introduced in Java 8, enabling more concise code. Here is the most straightforward example: 1 2 3 4 5 6 7 8 9 10 Runnable runnable1 = new Runnable() { @Override public void run() { System.out.println("runnable1 start!!!"); } }; Runnable runnable2 = () -> System.out.println("runnable2 start!!!"); runnable1.run(); runnable2.run(); Both blocks are equivalent, but the lambda version is a single line. The basic form is () -> expression or () -> { statements; }. ...