# 2장: 객체의 생성과 파괴

- [item 1) 생성자 대신 정적 팩토리 메서드를 고려하라](https://develop-footprint.gitbook.io/o/java/effective-java/2/item-1.md)
- [item2) 생성자에 매개변수가 많다면 빌더를 고려하라](https://develop-footprint.gitbook.io/o/java/effective-java/2/item2.md)
- [item3) private 생성자나 열거 타입으로 싱글톤임을 보증하라](https://develop-footprint.gitbook.io/o/java/effective-java/2/item3-private.md)
- [item4) 인스턴스화를 막으려면 private 생성자를 사용](https://develop-footprint.gitbook.io/o/java/effective-java/2/item4-private.md)
- [item5) 자원을 직접 명시하는 대신 의존 객체 주입 사용](https://develop-footprint.gitbook.io/o/java/effective-java/2/item5.md)
- [item6) 불필요한 객체 생성 지양](https://develop-footprint.gitbook.io/o/java/effective-java/2/item6.md)
- [item7) 다 쓴 객체는 참조 해제하라](https://develop-footprint.gitbook.io/o/java/effective-java/2/item7.md)
- [item8) finalizer와 cleaner 사용 자제](https://develop-footprint.gitbook.io/o/java/effective-java/2/item8-finalizer-cleaner.md)
- [item9) try-with-resources를 사용하자](https://develop-footprint.gitbook.io/o/java/effective-java/2/item9-try-with-resources.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://develop-footprint.gitbook.io/o/java/effective-java/2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
