Tagged articles
Final
23 articles · Page 1 of 1
The article explains the Template Method design pattern, showing how to lock a fixed process skeleton in a parent class while delegating variable steps to subclasses, contrasting it with the Strategy pattern and illustrating its use in real‑world frameworks.
Design PatternFinalHook Method
0 likes · 14 min read

The article explains how the Java final keyword can be applied to classes and methods to prevent inheritance and overriding, provides syntax and concrete code examples—including a final class and a final method in a chess algorithm—and advises using final for safety in constructors.
FinalJavaclass
0 likes · 5 min read

This tutorial walks through Java member methods, covering return statement syntax, proper use of getters and setters, the static modifier for class members, and the final keyword for classes, variables, and methods, with concrete code examples and explanations.
FinalJavafundamentals
0 likes · 12 min read

This article explains the distinct purposes of Java's final keyword, finally block, and finalize method, shows how to use them with classes, methods, and variables, highlights scenarios where finally may not run, discusses finalize deprecation, and recommends modern resource‑management techniques like try‑with‑resources.
Exception HandlingFinalFinalize
0 likes · 5 min read

The article explains that Java makes the String class final to ensure security, improve performance through string pooling and hash‑code caching, provide inherent thread‑safety, and maintain consistent behavior by preventing subclassing, illustrating each benefit with clear examples.
FinalJavaString
0 likes · 4 min read

This article explains C++ polymorphism, covering virtual functions, the override and final keywords, pure virtual functions, virtual destructors, vtable implementation, performance considerations, modern C++ improvements, and practical examples with code snippets.
@OverrideAbstract ClassC++
0 likes · 9 min read

This article explains how C++11’s nullptr, override, and final keywords eliminate common bugs, improve code clarity, and enforce design intent, providing practical examples and step‑by‑step guidance for safer, more maintainable C++ code.
@OverrideBest PracticesC++
0 likes · 9 min read

The article explains the Java Memory Model and its core concepts of visibility, atomicity, and ordering, detailing how volatile, synchronized, and final keywords work, the impact of CPU cache and instruction reordering, and low‑level mechanisms such as lock, cmpxchg, and false sharing.
CASConcurrencyFinal
0 likes · 20 min read

This article explains how Java developers can reuse code without duplication by employing composition, inheritance, and delegation, details the syntax and initialization rules for each, and clarifies the use of the final keyword for data, methods, parameters, and classes.
CompositionDelegationFinal
0 likes · 11 min read

This article introduces the ten most important new features of PHP 8.1—including enums, fibers, the never return type, readonly properties, final class constants, array_is_list(), fsync/fdatasync, string‑key array unpacking, the $_FILES full_path key, and the IntlDatePatternGenerator class—each explained with clear code examples.
BackendFibersFinal
0 likes · 15 min read

This article explains why Java strings are immutable, how the JVM uses the string constant pool and the final keyword to manage memory, and demonstrates the behavior with code examples that show reference handling, object creation, and common string operations.
FinalJVMJava
0 likes · 11 min read

The article explains why Java’s anonymous inner classes require captured variables to be final or effectively final, how this behavior changed after Java 8, and why Kotlin allows modification of such variables, illustrating the differences with decompiled code examples.
Anonymous Inner ClassFinalKotlin
0 likes · 6 min read

This article explains why Java String objects are immutable, how the JVM’s string constant pool reuses instances, the role of the final keyword and char[] storage, and demonstrates that all mutating operations actually create new String objects rather than altering the original.
FinalJVMJava
0 likes · 10 min read

This article explains the distinct purposes, usage rules, and underlying bytecode behavior of Java's final, finally, and finalize keywords, covering class and method immutability, variable constancy, guaranteed execution blocks, deprecated finalization, and common performance misconceptions.
FinalFinalizeexception-handling
0 likes · 14 min read

The article explores whether Java private methods are automatically treated as final by examining IDE warnings, quoting "Thinking in Java," compiling sample code, and analyzing the resulting bytecode with a viewer to reveal the actual access flags and their implications.
FinalJVMJava
0 likes · 6 min read

This article explores Java’s memory model rules for final fields, detailing how writes and reads are ordered, the impact on object construction, examples with primitive and reference types, and processor-specific implementations, illustrating why final provides safe initialization without explicit synchronization.
FinalJMMJava
0 likes · 13 min read


JavaEdgeMay 1, 2020 · Backend Development
This article explains the warning caused by @Autowired, compares field injection with constructor injection, clarifies Java's initialization order, shows how to fix the issue using constructor injection, and discusses whether adding the final modifier to injected fields is necessary.
@AutowiredConstructor InjectionFinal
0 likes · 5 min read

This article explains the semantics of Java's final keyword, how the compiler and JVM enforce immutability and memory‑barrier rules, and why final fields provide thread‑safe, write‑once‑read‑many behavior for both instance and static variables.
ConcurrencyFinalJava
0 likes · 13 min read

This article explains the Java Memory Model, how hardware and the JVM handle memory, the eight JMM operations, instruction reordering, memory barriers, and the specific memory semantics of volatile and final variables, providing code examples and visual diagrams for clarity.
ConcurrencyFinalJava
0 likes · 12 min read

This article explains the two ways to create Java strings, demonstrates how string literals are shared in the method area, shows the effect of the intern() method at runtime, and discusses why the String class is final, immutable, and thread‑safe.
FinalJavaString
0 likes · 8 min read

This article shares a seasoned developer’s top ten obsessive Java programming techniques—ranging from placing string literals first to avoid NullPointerExceptions, never trusting early JDK APIs, treating -1 cautiously, enforcing final modifiers, and rigorously structuring switch statements—to help you write safer, more maintainable code.
Best PracticesFinalNullPointerException
0 likes · 9 min read

This article explains Java's static data members and methods, demonstrates how they are declared and accessed through a Human class example, shows how object constructors can modify static fields, and clarifies the purpose and usage of the final keyword in Java programming.
Class FieldsFinalJava
0 likes · 7 min read

This article explains Java's final keyword, covering its use with classes, methods, and variables, demonstrates how to declare final members, shows code examples of final variables, methods, and classes, and discusses the performance, thread‑safety, and immutability benefits of using final in Java applications.
Finalkeywordthread-safety
0 likes · 7 min read
