第4章:类和接口
CLASSES and interfaces lie at the heart of the Java programming language. They are its basic units of abstraction. The language provides many powerful elements that you can use to design classes and interfaces. This chapter contains guidelines to help you make the best use of these elements so that your classes and interfaces are usable, robust, and flexible.
类和接口是Java编程语言的核心。它们是Java的基本抽象单元。Java提供了很多强大的元素,我们可以用来设计类和接口。本章提供了一些指导原则来帮助我们更好地去利用这些元素,以此让我们的类和接口更有用,健壮和灵活。