Derya Yıldırım·Oct 28, 2025What Is This Static Factory Method ?When we first start learning to code, one of the first things we discover is how to create objects using the new keyword. For example, in…
Pratham Karia·Jun 19, 2025Constructor vs Static Factory vs Builder Pattern: When and What to Use in JavaJava offers multiple ways to create objects, each with its own strengths and trade-offs. Whether you’re building a simple data holder or a…
Avicsebooks·May 3, 2025Building Better Java Solutions Decision-Making in Practice -1Good software isn’t just about writing code — it’s about making the right decisions along the way. In this blog series, we’ll explore…A response icon1
InJudy’s Effective Java sharingbyJudy Huang·Oct 30, 2024Item 27: 編寫泛型方法在Item 26: 編寫自己的泛型說明如何寫泛型類型,在這個Item將會說明如何轉寫泛型方法,允許方法可以彈性接受不同型別的參數,不用寫多個方法處理。
InJudy’s Effective Java sharingbyJudy Huang·Jul 25, 2024Item 15: 最小化可變性所謂immutable類別是指,在類別實體化之後,類別裡面的資料不能再被更動修改,因此,相較於mutable類別狀態的不確定性,immutable類別不管在設計、實作和使用上,都是比較簡潔和安全的,而且如果系統是multi-thread的設計,immutable類別也可以確保th…