[Objects] Chapter 2. Object-Oriented Programming This document explains the object-oriented programming methodology for implementing a movie reservation system, covering concepts such as collaboration, objects, classes, inheritance, polymorphism, abstraction, and composition. It presents methods for sec
[Objects] Chapter 1. Objects, Design In software development, practice is more important than theory, and good design makes code easier to understand and more adaptable to changes. Object oriented design provides a way to properly manage dependencies between collaborating objects, which can
[Effective Java] Item 6. Avoid Unnecessary Object Creation This guide provides advice on how to reduce unnecessary object creation in Java. For immutable objects like String and Boolean, use literals, and for regular expressions, it is better to cache Pattern instances. Also, autoboxing can lead to performance de
[Effective Java] Item 5. Use Dependency Injection instead of Hard-Coding Resources If a class relies on external resources, it is not recommended to use singletons or static utility classes. Dependency injection can be used to improve the class's flexibility, reusability, and testability, and using the factory method pattern can lead to
[Effective Java] Item 4. Use a private constructor if you want to prevent instantiation Utility classes that contain only static methods and fields should set the access modifier of the constructor to private to prevent instantiation. This prevents users from mistakenly assuming that the constructor is automatically generated and prevents in
[Effective Java] Item 3. Ensure Singleton with Private Constructor or Enum Type This article introduces three ways to implement the Singleton pattern in Java (public static member, static factory method, enum type), explains the pros and cons of each method, and the precautions to be taken during serialization. It presents the enum t
[Effective Java] Item 2. Consider a Builder if Your Constructor Has Many Parameters When creating objects with many parameters, using the builder pattern can make your code cleaner and easier to read. You create a builder object with required parameters, set optional parameters using setter methods, and then call the build() method to co
[Effective Java] Item 1: Consider Static Factory Methods Instead of Constructors Static factory methods provide a flexible and efficient way to create instances instead of constructors. They can have names, return instances that meet specific conditions, and improve performance through caching. Unlike the singleton pattern, they can c
What is the Java Collections Framework (JCF)? - Definition and Features of JCF (JAVA) The Java Collections Framework (JCF) is a set of Java classes that provides a standardized way to efficiently handle multiple data. JCF implements data storage structures and algorithms in classes to increase code reusability, performance, and API interop
[Spring] What are Filter, Interceptor, and Argument Resolver? Learn in detail about the concepts and differences between Filter, Interceptor, and Argument Resolver that handle requests in Spring web applications. This article provides a comparative analysis of the implementation methods, timing of use, advantages an
[Spring] How to Use @Async Learn how to easily implement Java asynchronous processing using Spring @Async. You can convert synchronous methods to asynchronous ones using the @Async annotation and increase efficiency with thread pool settings. This document also covers how to effect
[Java] Synchronized Collection vs Concurrent Collection This article compares and analyzes various methods and their pros and cons for solving synchronization issues when using collections in a multithreaded environment in Java. It introduces the characteristics and performance differences between synchronized
equals() vs hashCode() In Java, `equals()` and `hashCode()` are important methods used to compare the equality and identity of objects. `equals()` compares the content of objects, while `hashCode()` checks if the objects are identical. In hash data structures, `hashCode()` is u
[Java] Reflection Concept and Usage Reflection is an API that supports accessing class information and manipulating classes while a Java program is running. It allows you to create classes and access fields and methods at runtime, but it can compromise encapsulation and lead to performance
[DB] Criteria for setting up a cache This is a practical guide on how to cache data that is frequently read but rarely written. By using an APM like DataDog, you can analyze RDB query call history and find out how to select tables with a high number of read queries and a low number of update