{"id":13618295,"url":"https://github.com/clxering/Effective-Java-3rd-edition-Chinese-English-bilingual","last_synced_at":"2025-04-14T10:31:25.147Z","repository":{"id":37381785,"uuid":"145682348","full_name":"clxering/Effective-Java-3rd-edition-Chinese-English-bilingual","owner":"clxering","description":"Effective Java（第3版）各章节的中英文学习参考（已完成）","archived":false,"fork":false,"pushed_at":"2023-09-10T01:04:01.000Z","size":1505,"stargazers_count":3824,"open_issues_count":8,"forks_count":991,"subscribers_count":69,"default_branch":"dev","last_synced_at":"2025-04-12T20:44:00.455Z","etag":null,"topics":["effective-java","java"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clxering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-08-22T08:51:47.000Z","updated_at":"2025-04-09T09:22:56.000Z","dependencies_parsed_at":"2023-01-31T23:00:56.081Z","dependency_job_id":"cfb8ecd3-789e-4e49-bdc3-2ac4b2356ced","html_url":"https://github.com/clxering/Effective-Java-3rd-edition-Chinese-English-bilingual","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clxering","download_url":"https://codeload.github.com/clxering/Effective-Java-3rd-edition-Chinese-English-bilingual/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248862638,"owners_count":21173842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["effective-java","java"],"created_at":"2024-08-01T20:01:58.003Z","updated_at":"2025-04-14T10:31:25.113Z","avatar_url":"https://github.com/clxering.png","language":null,"funding_links":[],"categories":["Others","Others (1002)"],"sub_categories":[],"readme":"# Effective-Java-3rd-edition-Chinese-English-bilingual\nEffective Java（第 3 版）各章节的中英文学习参考，希望对 Java 技术的提高有所帮助，欢迎通过 issue 或 pr 提出建议和修改意见。\n\n## 目录（Contents）\n- **Chapter 2. Creating and Destroying Objects（创建和销毁对象）**\n    - [Chapter 2 Introduction（章节介绍）](Chapter-2/Chapter-2-Introduction.md)\n    - [Item 1: Consider static factory methods instead of constructors（考虑以静态工厂方法代替构造函数）](Chapter-2/Chapter-2-Item-1-Consider-static-factory-methods-instead-of-constructors.md)\n    - [Item 2: Consider a builder when faced with many constructor parameters（在面对多个构造函数参数时，请考虑构建器）](Chapter-2/Chapter-2-Item-2-Consider-a-builder-when-faced-with-many-constructor-parameters.md)\n    - [Item 3: Enforce the singleton property with a private constructor or an enum type（使用私有构造函数或枚举类型实施单例属性）](Chapter-2/Chapter-2-Item-3-Enforce-the-singleton-property-with-a-private-constructor-or-an-enum-type.md)\n    - [Item 4: Enforce noninstantiability with a private constructor（用私有构造函数实施不可实例化）](Chapter-2/Chapter-2-Item-4-Enforce-noninstantiability-with-a-private-constructor.md)\n    - [Item 5: Prefer dependency injection to hardwiring resources（依赖注入优于硬连接资源）](Chapter-2/Chapter-2-Item-5-Prefer-dependency-injection-to-hardwiring-resources.md)\n    - [Item 6: Avoid creating unnecessary objects（避免创建不必要的对象）](Chapter-2/Chapter-2-Item-6-Avoid-creating-unnecessary-objects.md)\n    - [Item 7: Eliminate obsolete object references（排除过时的对象引用）](Chapter-2/Chapter-2-Item-7-Eliminate-obsolete-object-references.md)\n    - [Item 8: Avoid finalizers and cleaners（避免使用终结器和清除器）](Chapter-2/Chapter-2-Item-8-Avoid-finalizers-and-cleaners.md)\n    - [Item 9: Prefer try with resources to try finally（使用 try-with-resources 优于 try-finally）](Chapter-2/Chapter-2-Item-9-Prefer-try-with-resources-to-try-finally.md)\n- **Chapter 3. Methods Common to All Objects（对象的通用方法）**\n    - [Chapter 3 Introduction（章节介绍）](Chapter-3/Chapter-3-Introduction.md)\n    - [Item 10: Obey the general contract when overriding equals（覆盖 equals 方法时应遵守的约定）](Chapter-3/Chapter-3-Item-10-Obey-the-general-contract-when-overriding-equals.md)\n    - [Item 11: Always override hashCode when you override equals（当覆盖 equals 方法时，总要覆盖 hashCode 方法）](Chapter-3/Chapter-3-Item-11-Always-override-hashCode-when-you-override-equals.md)\n    - [Item 12: Always override toString（始终覆盖 toString 方法）](Chapter-3/Chapter-3-Item-12-Always-override-toString.md)\n    - [Item 13: Override clone judiciously（明智地覆盖 clone 方法）](Chapter-3/Chapter-3-Item-13-Override-clone-judiciously.md)\n    - [Item 14: Consider implementing Comparable（考虑实现 Comparable 接口）](Chapter-3/Chapter-3-Item-14-Consider-implementing-Comparable.md)\n- **Chapter 4. Classes and Interfaces（类和接口）**\n    - [Chapter 4 Introduction（章节介绍）](Chapter-4/Chapter-4-Introduction.md)\n    - [Item 15: Minimize the accessibility of classes and members（尽量减少类和成员的可访问性）](Chapter-4/Chapter-4-Item-15-Minimize-the-accessibility-of-classes-and-members.md)\n    - [Item 16: In public classes use accessor methods not public fields（在公共类中，使用访问器方法，而不是公共字段）](Chapter-4/Chapter-4-Item-16-In-public-classes-use-accessor-methods-not-public-fields.md)\n    - [Item 17: Minimize mutability（减少可变性）](Chapter-4/Chapter-4-Item-17-Minimize-mutability.md)\n    - [Item 18: Favor composition over inheritance（优先选择复合而不是继承）](Chapter-4/Chapter-4-Item-18-Favor-composition-over-inheritance.md)\n    - [Item 19: Design and document for inheritance or else prohibit it（继承要设计良好并且具有文档，否则禁止使用）](Chapter-4/Chapter-4-Item-19-Design-and-document-for-inheritance-or-else-prohibit-it.md)\n    - [Item 20: Prefer interfaces to abstract classes（接口优于抽象类）](Chapter-4/Chapter-4-Item-20-Prefer-interfaces-to-abstract-classes.md)\n    - [Item 21: Design interfaces for posterity（为后代设计接口）](Chapter-4/Chapter-4-Item-21-Design-interfaces-for-posterity.md)\n    - [Item 22: Use interfaces only to define types（接口只用于定义类型）](Chapter-4/Chapter-4-Item-22-Use-interfaces-only-to-define-types.md)\n    - [Item 23: Prefer class hierarchies to tagged classes（类层次结构优于带标签的类）](Chapter-4/Chapter-4-Item-23-Prefer-class-hierarchies-to-tagged-classes.md)\n    - [Item 24: Favor static member classes over nonstatic（静态成员类优于非静态成员类）](Chapter-4/Chapter-4-Item-24-Favor-static-member-classes-over-nonstatic.md)\n    - [Item 25: Limit source files to a single top level class（源文件仅限有单个顶层类）](Chapter-4/Chapter-4-Item-25-Limit-source-files-to-a-single-top-level-class.md)\n- **Chapter 5. Generics（泛型）**\n    - [Chapter 5 Introduction（章节介绍）](Chapter-5/Chapter-5-Introduction.md)\n    - [Item 26: Do not use raw types（不要使用原始类型）](Chapter-5/Chapter-5-Item-26-Do-not-use-raw-types.md)\n    - [Item 27: Eliminate unchecked warnings（消除 unchecked 警告）](Chapter-5/Chapter-5-Item-27-Eliminate-unchecked-warnings.md)\n    - [Item 28: Prefer lists to arrays（list 优于数组）](Chapter-5/Chapter-5-Item-28-Prefer-lists-to-arrays.md)\n    - [Item 29: Favor generic types（优先使用泛型）](Chapter-5/Chapter-5-Item-29-Favor-generic-types.md)\n    - [Item 30: Favor generic methods（优先使用泛型方法）](Chapter-5/Chapter-5-Item-30-Favor-generic-methods.md)\n    - [Item 31: Use bounded wildcards to increase API flexibility（使用有界通配符增加 API 的灵活性）](Chapter-5/Chapter-5-Item-31-Use-bounded-wildcards-to-increase-API-flexibility.md)\n    - [Item 32: Combine generics and varargs judiciously（明智地合用泛型和可变参数）](Chapter-5/Chapter-5-Item-32-Combine-generics-and-varargs-judiciously.md)\n    - [Item 33: Consider typesafe heterogeneous containers（考虑类型安全的异构容器）](Chapter-5/Chapter-5-Item-33-Consider-typesafe-heterogeneous-containers.md)\n- **Chapter 6. Enums and Annotations（枚举和注解）**\n    - [Chapter 6 Introduction（章节介绍）](Chapter-6/Chapter-6-Introduction.md)\n    - [Item 34: Use enums instead of int constants（用枚举类型代替 int 常量）](Chapter-6/Chapter-6-Item-34-Use-enums-instead-of-int-constants.md)\n    - [Item 35: Use instance fields instead of ordinals（使用实例字段替代序数）](Chapter-6/Chapter-6-Item-35-Use-instance-fields-instead-of-ordinals.md)\n    - [Item 36: Use EnumSet instead of bit fields（用 EnumSet 替代位字段）](Chapter-6/Chapter-6-Item-36-Use-EnumSet-instead-of-bit-fields.md)\n    - [Item 37: Use EnumMap instead of ordinal indexing（使用 EnumMap 替换序数索引）](Chapter-6/Chapter-6-Item-37-Use-EnumMap-instead-of-ordinal-indexing.md)\n    - [Item 38: Emulate extensible enums with interfaces（使用接口模拟可扩展枚举）](Chapter-6/Chapter-6-Item-38-Emulate-extensible-enums-with-interfaces.md)\n    - [Item 39: Prefer annotations to naming patterns（注解优于命名模式）](Chapter-6/Chapter-6-Item-39-Prefer-annotations-to-naming-patterns.md)\n    - [Item 40: Consistently use the Override annotation（坚持使用 @Override 注解）](Chapter-6/Chapter-6-Item-40-Consistently-use-the-Override-annotation.md)\n    - [Item 41: Use marker interfaces to define types（使用标记接口定义类型）](Chapter-6/Chapter-6-Item-41-Use-marker-interfaces-to-define-types.md)\n- **Chapter 7. Lambdas and Streams（λ 表达式和流）**\n    - [Chapter 7 Introduction（章节介绍）](Chapter-7/Chapter-7-Introduction.md)\n    - [Item 42: Prefer lambdas to anonymous classes（λ 表达式优于匿名类）](Chapter-7/Chapter-7-Item-42-Prefer-lambdas-to-anonymous-classes.md)\n    - [Item 43: Prefer method references to lambdas（方法引用优于 λ 表达式）](Chapter-7/Chapter-7-Item-43-Prefer-method-references-to-lambdas.md)\n    - [Item 44: Favor the use of standard functional interfaces（优先使用标准函数式接口）](Chapter-7/Chapter-7-Item-44-Favor-the-use-of-standard-functional-interfaces.md)\n    - [Item 45: Use streams judiciously（明智地使用流）](Chapter-7/Chapter-7-Item-45-Use-streams-judiciously.md)\n    - [Item 46: Prefer side effect free functions in streams（在流中使用无副作用的函数）](Chapter-7/Chapter-7-Item-46-Prefer-side-effect-free-functions-in-streams.md)\n    - [Item 47: Prefer Collection to Stream as a return type（优先选择 Collection 而不是流作为返回类型）](Chapter-7/Chapter-7-Item-47-Prefer-Collection-to-Stream-as-a-return-type.md)\n    - [Item 48: Use caution when making streams parallel（谨慎使用并行流）](Chapter-7/Chapter-7-Item-48-Use-caution-when-making-streams-parallel.md)\n- **Chapter 8. Methods（方法）**\n    - [Chapter 8 Introduction（章节介绍）](Chapter-8/Chapter-8-Introduction.md)\n    - [Item 49: Check parameters for validity（检查参数的有效性）](Chapter-8/Chapter-8-Item-49-Check-parameters-for-validity.md)\n    - [Item 50: Make defensive copies when needed（在需要时制作防御性副本）](Chapter-8/Chapter-8-Item-50-Make-defensive-copies-when-needed.md)\n    - [Item 51: Design method signatures carefully（仔细设计方法签名）](Chapter-8/Chapter-8-Item-51-Design-method-signatures-carefully.md)\n    - [Item 52: Use overloading judiciously（明智地使用重载）](Chapter-8/Chapter-8-Item-52-Use-overloading-judiciously.md)\n    - [Item 53: Use varargs judiciously（明智地使用可变参数）](Chapter-8/Chapter-8-Item-53-Use-varargs-judiciously.md)\n    - [Item 54: Return empty collections or arrays, not nulls（返回空集合或数组，而不是 null）](Chapter-8/Chapter-8-Item-54-Return-empty-collections-or-arrays-not-nulls.md)\n    - [Item 55: Return optionals judiciously（明智地的返回 Optional）](Chapter-8/Chapter-8-Item-55-Return-optionals-judiciously.md)\n    - [Item 56: Write doc comments for all exposed API elements（为所有公开的 API 元素编写文档注释）](Chapter-8/Chapter-8-Item-56-Write-doc-comments-for-all-exposed-API-elements.md)\n- **Chapter 9. General Programming（通用程序设计）**\n    - [Chapter 9 Introduction（章节介绍）](Chapter-9/Chapter-9-Introduction.md)\n    - [Item 57: Minimize the scope of local variables（将局部变量的作用域最小化）](Chapter-9/Chapter-9-Item-57-Minimize-the-scope-of-local-variables.md)\n    - [Item 58: Prefer for-each loops to traditional for loops（for-each 循环优于传统的 for 循环）](Chapter-9/Chapter-9-Item-58-Prefer-for-each-loops-to-traditional-for-loops.md)\n    - [Item 59: Know and use the libraries（了解并使用库）](Chapter-9/Chapter-9-Item-59-Know-and-use-the-libraries.md)\n    - [Item 60: Avoid float and double if exact answers are required（若需要精确答案就应避免使用 float 和 double 类型）](Chapter-9/Chapter-9-Item-60-Avoid-float-and-double-if-exact-answers-are-required.md)\n    - [Item 61: Prefer primitive types to boxed primitives（基本数据类型优于包装类）](Chapter-9/Chapter-9-Item-61-Prefer-primitive-types-to-boxed-primitives.md)\n    - [Item 62: Avoid strings where other types are more appropriate（其他类型更合适时应避免使用字符串）](Chapter-9/Chapter-9-Item-62-Avoid-strings-where-other-types-are-more-appropriate.md)\n    - [Item 63: Beware the performance of string concatenation（当心字符串连接引起的性能问题）](Chapter-9/Chapter-9-Item-63-Beware-the-performance-of-string-concatenation.md)\n    - [Item 64: Refer to objects by their interfaces（通过接口引用对象）](Chapter-9/Chapter-9-Item-64-Refer-to-objects-by-their-interfaces.md)\n    - [Item 65: Prefer interfaces to reflection（接口优于反射）](Chapter-9/Chapter-9-Item-65-Prefer-interfaces-to-reflection.md)\n    - [Item 66: Use native methods judiciously（明智地使用本地方法）](Chapter-9/Chapter-9-Item-66-Use-native-methods-judiciously.md)\n    - [Item 67: Optimize judiciously（明智地进行优化）](Chapter-9/Chapter-9-Item-67-Optimize-judiciously.md)\n    - [Item 68: Adhere to generally accepted naming conventions（遵守被广泛认可的命名约定）](Chapter-9/Chapter-9-Item-68-Adhere-to-generally-accepted-naming-conventions.md)\n- **Chapter 10. Exceptions（异常）**\n    - [Chapter 10 Introduction（章节介绍）](Chapter-10/Chapter-10-Introduction.md)\n    - [Item 69: Use exceptions only for exceptional conditions（仅在确有异常条件下使用异常）](Chapter-10/Chapter-10-Item-69-Use-exceptions-only-for-exceptional-conditions.md)\n    - [Item 70: Use checked exceptions for recoverable conditions and runtime exceptions for programming errors（对可恢复情况使用 checked 异常，对编程错误使用运行时异常）](Chapter-10/Chapter-10-Item-70-Use-checked-exceptions-for-recoverable-conditions-and-runtime-exceptions-for-programming-errors.md)\n    - [Item 71: Avoid unnecessary use of checked exceptions（避免不必要地使用 checked 异常）](Chapter-10/Chapter-10-Item-71-Avoid-unnecessary-use-of-checked-exceptions.md)\n    - [Item 72: Favor the use of standard exceptions（鼓励复用标准异常）](Chapter-10/Chapter-10-Item-72-Favor-the-use-of-standard-exceptions.md)\n    - [Item 73: Throw exceptions appropriate to the abstraction（抛出能用抽象解释的异常）](Chapter-10/Chapter-10-Item-73-Throw-exceptions-appropriate-to-the-abstraction.md)\n    - [Item 74: Document all exceptions thrown by each method（为每个方法记录会抛出的所有异常）](Chapter-10/Chapter-10-Item-74-Document-all-exceptions-thrown-by-each-method.md)\n    - [Item 75: Include failure capture information in detail messages（异常详细消息中应包含捕获失败的信息）](Chapter-10/Chapter-10-Item-75-Include-failure-capture-information-in-detail-messages.md)\n    - [Item 76: Strive for failure atomicity（尽力保证故障原子性）](Chapter-10/Chapter-10-Item-76-Strive-for-failure-atomicity.md)\n    - [Item 77: Don’t ignore exceptions（不要忽略异常）](Chapter-10/Chapter-10-Item-77-Don’t-ignore-exceptions.md)\n- **Chapter 11. Concurrency（并发）**\n    - [Chapter 11 Introduction（章节介绍）](Chapter-11/Chapter-11-Introduction.md)\n    - [Item 78: Synchronize access to shared mutable data（对共享可变数据的同步访问）](Chapter-11/Chapter-11-Item-78-Synchronize-access-to-shared-mutable-data.md)\n    - [Item 79: Avoid excessive synchronization（避免过度同步）](Chapter-11/Chapter-11-Item-79-Avoid-excessive-synchronization.md)\n    - [Item 80: Prefer executors, tasks, and streams to threads（Executor、task、流优于直接使用线程）](Chapter-11/Chapter-11-Item-80-Prefer-executors,-tasks,-and-streams-to-threads.md)\n    - [Item 81: Prefer concurrency utilities to wait and notify（并发实用工具优于 wait 和 notify）](Chapter-11/Chapter-11-Item-81-Prefer-concurrency-utilities-to-wait-and-notify.md)\n    - [Item 82: Document thread safety（文档应包含线程安全属性）](Chapter-11/Chapter-11-Item-82-Document-thread-safety.md)\n    - [Item 83: Use lazy initialization judiciously（明智地使用延迟初始化）](Chapter-11/Chapter-11-Item-83-Use-lazy-initialization-judiciously.md)\n    - [Item 84: Don’t depend on the thread scheduler（不要依赖线程调度器）](Chapter-11/Chapter-11-Item-84-Don’t-depend-on-the-thread-scheduler.md)\n- **Chapter 12. Serialization（序列化）**\n    - [Chapter 12 Introduction（章节介绍）](Chapter-12/Chapter-12-Introduction.md)\n    - [Item 85: Prefer alternatives to Java serialization（优先选择 Java 序列化的替代方案）](Chapter-12/Chapter-12-Item-85-Prefer-alternatives-to-Java-serialization.md)\n    - [Item 86: Implement Serializable with great caution（非常谨慎地实现 Serializable）](Chapter-12/Chapter-12-Item-86-Implement-Serializable-with-great-caution.md)\n    - [Item 87: Consider using a custom serialized form（考虑使用自定义序列化形式）](Chapter-12/Chapter-12-Item-87-Consider-using-a-custom-serialized-form.md)\n    - [Item 88: Write readObject methods defensively（防御性地编写 readObject 方法）](Chapter-12/Chapter-12-Item-88-Write-readObject-methods-defensively.md)\n    - [Item 89: For instance control, prefer enum types to readResolve（对于实例控制，枚举类型优于 readResolve）](Chapter-12/Chapter-12-Item-89-For-instance-control-prefer-enum-types-to-readResolve.md)\n    - [Item 90: Consider serialization proxies instead of serialized instances（考虑以序列化代理代替序列化实例）](Chapter-12/Chapter-12-Item-90-Consider-serialization-proxies-instead-of-serialized-instances.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclxering%2FEffective-Java-3rd-edition-Chinese-English-bilingual/lists"}