René's URL Explorer Experiment


Title: JavaNotes/EffectiveJava at master · Tengdw/JavaNotes · GitHub

Open Graph Title: JavaNotes/EffectiveJava at master · Tengdw/JavaNotes

X Title: JavaNotes/EffectiveJava at master · Tengdw/JavaNotes

Description: Java 学习笔记. Contribute to Tengdw/JavaNotes development by creating an account on GitHub.

Open Graph Description: Java 学习笔记. Contribute to Tengdw/JavaNotes development by creating an account on GitHub.

X Description: Java 学习笔记. Contribute to Tengdw/JavaNotes development by creating an account on GitHub.

Opengraph URL: https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/tree/*name(/*path)
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:8339e333-e607-5f62-0d69-d6ea0357536a
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id858C:381E5:528D72:71391A:6A506F9E
html-safe-noncea50e7847084b15d40e24f9bc93c72a2052238ac1163b516ad3c4293d4b23bd17
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NThDOjM4MUU1OjUyOEQ3Mjo3MTM5MUE6NkE1MDZGOUUiLCJ2aXNpdG9yX2lkIjoiODk1MDIwNzY0MzI1NjkwOTcyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac970962915c31e58ba92e0583f3ebcdb41ae4d627e7a5ab643cf5c93659fd34ab
hovercard-subject-tagrepository:139085099
github-keyboard-shortcutsrepository,source-code,file-tree,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///files/disambiguate
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava
twitter:imagehttps://opengraph.githubassets.com/a125268582261330400b16cfde80e4c5bbf71dca8ae0254b35532719cf43a12b/Tengdw/JavaNotes
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a125268582261330400b16cfde80e4c5bbf71dca8ae0254b35532719cf43a12b/Tengdw/JavaNotes
og:image:altJava 学习笔记. Contribute to Tengdw/JavaNotes development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-cache
go-importgithub.com/Tengdw/JavaNotes git https://github.com/Tengdw/JavaNotes.git
octolytics-dimension-user_id26060551
octolytics-dimension-user_loginTengdw
octolytics-dimension-repository_id139085099
octolytics-dimension-repository_nwoTengdw/JavaNotes
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id139085099
octolytics-dimension-repository_network_root_nwoTengdw/JavaNotes
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTengdw%2FJavaNotes%2Ftree%2Fmaster%2FEffectiveJava
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTengdw%2FJavaNotes%2Ftree%2Fmaster%2FEffectiveJava
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Ffiles%2Fdisambiguate&source=header-repo&source_repo=Tengdw%2FJavaNotes
Reloadhttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava
Reloadhttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava
Reloadhttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava
Tengdw https://github.com/Tengdw
JavaNoteshttps://github.com/Tengdw/JavaNotes
Notifications https://github.com/login?return_to=%2FTengdw%2FJavaNotes
Fork 0 https://github.com/login?return_to=%2FTengdw%2FJavaNotes
Star 0 https://github.com/login?return_to=%2FTengdw%2FJavaNotes
Code https://github.com/Tengdw/JavaNotes
Issues 0 https://github.com/Tengdw/JavaNotes/issues
Pull requests 0 https://github.com/Tengdw/JavaNotes/pulls
Actions https://github.com/Tengdw/JavaNotes/actions
Projects https://github.com/Tengdw/JavaNotes/projects
Security and quality 0 https://github.com/Tengdw/JavaNotes/security
Insights https://github.com/Tengdw/JavaNotes/pulse
Code https://github.com/Tengdw/JavaNotes
Issues https://github.com/Tengdw/JavaNotes/issues
Pull requests https://github.com/Tengdw/JavaNotes/pulls
Actions https://github.com/Tengdw/JavaNotes/actions
Projects https://github.com/Tengdw/JavaNotes/projects
Security and quality https://github.com/Tengdw/JavaNotes/security
Insights https://github.com/Tengdw/JavaNotes/pulse
https://github.com/Tengdw/JavaNotes
JavaNoteshttps://github.com/Tengdw/JavaNotes/tree/master
Historyhttps://github.com/Tengdw/JavaNotes/commits/master/EffectiveJava
https://github.com/Tengdw/JavaNotes/commits/master/EffectiveJava
JavaNoteshttps://github.com/Tengdw/JavaNotes/tree/master
..https://github.com/Tengdw/JavaNotes/tree/master
srchttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava/src
srchttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava/src
README.mdhttps://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/README.md
README.mdhttps://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/README.md
build.gradlehttps://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/build.gradle
build.gradlehttps://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/build.gradle
README.mdhttps://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#readme
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#effective-java-第二版
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#1-考虑静态工厂方法代替构造器
遇到多个构造器参数时要考虑用构建器https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule2.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#2-遇到多个构造器参数时要考虑用构建器
用私有构造器或者枚举类型强化 Singleton 属性https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule3.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#3-用私有构造器或者枚举类型强化-singleton-属性
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#4-通过私有构造器强化不可实例化能力
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#5-避免创建不必要的对象
消除过期的对象引用https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule6.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#6-消除过期的对象引用
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#7-避免使用终结方法-finalize
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#8-覆盖-equals-时请遵循通用约定
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#9-覆盖-equals-时总要覆盖-hashcode
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#10-始终要覆盖-tostring
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#11-谨慎地覆盖-clone
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#12-考虑实现-comparable-接口
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#13-使类和成员的可访问性最小化
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#14-在公有类中使用访问方法而非公有域
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#15-使可变性最小化
复合优先于继承https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule16.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#16-复合优先于继承
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#17-要么为继承而设计并提供文档说明要么就禁止继承
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#18-接口优于抽象类
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#19-接口只用于定义类型
类层次优于标签类https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule20.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#20-类层次优于标签类
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#21-用函数对象表示策略
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#22-优先考虑静态成员类
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#23-请不要再新代码中使用原生态类型
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#24-消除非受检警告
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#25-列表优先于数组
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#26-优先考虑泛型
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#27-优先考虑泛型方法
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#28-利用有限制通配符来提升-api-的灵活性
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#29-优先考虑类型安全的异构容器
用 enum 代替 int 常量https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule30.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#30-用-enum-代替-int-常量
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#31-用实例域代替序数
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#32-用-enumset-代替位域
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#33-用-enummap-代替序数索引
用接口模拟可伸缩的枚举https://github.com/Tengdw/JavaNotes/blob/master/EffectiveJava/src/main/java/com/tengdw/rule/rule34.java
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#34-用接口模拟可伸缩的枚举
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#35-注解优先于命名模式
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#36-坚持使用-override-注解
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#37-用标记接口定义类型
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#38-检查参数的有效性
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#39-必要时进行保护性拷贝
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#40-谨慎设计方法签名
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#41-慎用重载
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#42-慎用可变参数
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#43-返回零长度的数组或者集合而不是-null
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#44-为所有导出的-api-元素编写文档注释
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#45-将局部变量的作用域最小化
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#46-for-each-循环优先于传统的-for-循环
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#47-了解和使用类库
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#48-如果需要精确的答案请避免使用-float-和-double
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#49-基本类型优先于装箱基本类型
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#50-如果其他类型更适合则尽量避免使用字符串
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#51-当心字符串连接的性能
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#52-通过接口引用对象
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#53-接口优先于反射机制
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#54-谨慎地使用本地方法
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#55-谨慎地进行优化
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#56-遵守普遍接受的命名惯例
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#57-只针对异常情况才使用异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#58-对可恢复的情况使用受检异常对编程错误使用运行时异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#59-避免不必要地使用受检的异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#60-优先使用标准的异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#61-抛出与抽象相对应的异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#62-每个方法抛出的异常都要有文档
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#63-在细节消息中包含能捕获的信息
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#64-努力使失败保持原子性
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#65-不要忽略异常
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#66-同步访问共享的可变数据
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#67-避免过度同步
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#68-executor-和-task-优先于线程
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#69-并发工具优先于-wait-和-notify
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#70-线程安全性的文档化
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#71-慎用延迟初始化
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#72-不要依赖于线程调度器
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#73-避免使用线程组
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#74-谨慎地实现-serializable-接口
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#75-考虑使用自定义的序列化形式
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#76-保护性的编写-readobject-方法
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#77-对于实例控制枚举类型优先于-readobject
https://github.com/Tengdw/JavaNotes/tree/master/EffectiveJava#78-考虑用序列化代理代替实例化实例
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.