ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## Chapter 8. Methods(方法) ### Chapter 8 Introduction(章节介绍) THIS chapter discusses several aspects of method design: how to treat parameters and return values, how to design method signatures, and how to document methods. Much of the material in this chapter applies to constructors as well as to methods. Like Chapter 4, this chapter focuses on usability, robustness, and flexibility. 本章讨论了方法设计的几个方面:如何处理参数和返回值,如何设计方法签名,以及如何编写方法文档。本章的大部分内容不仅适用于方法,也适用于构造函数。与第四章一样,本章重点讨论可用性、健壮性和灵活性。