Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Lớp String, ví dụ, không phải là một phần cố hữu của ngôn ngữ Java. Nó là một phần của thư viện lớp Java chuẩn có thể được tìm thấy trong bất kỳ môi trường phát triển Java. Các lớp học thư viện được tạo ra bởi các nhân viên của Sun Microsystems, những người tạo ra ngôn ngữ Java. | 92 CHAPTER 2 objects and primitive data key key c The Java standard class library is a useful set of classes that anyone can use when writing Java programs. The String class for instance is not an inherent part of the Java language. It is part of the Java standard class library that can be found in any Java development environment. The classes that make up the library were created by employees at Sun Microsystems the people who created the Java language. The class library is made up of several clusters of related classes which are sometimes called Java APIs or Application Programmer Interface. For example we may refer to the Java Database API when we re talking about the set of classes that help us write programs that interact with a database. Another example of an API is the Java Swing API which refers to a set of classes that define special graphical components used in a graphical user interface GUI . Sometimes the entire standard library is referred to generically as the Java API though we generally avoid that use. A package is a Java language element used to group related classes under a common name. The classes of the Java standard class library are also grouped into packages which like the APIs let us group related classes by one name. Each class is part of a particular package. The String class for example is part of the java.lang package. The System class is part of the java.lang package as well. Figure 2.10 shows the organizations of packages in the overall library. The package organization is more fundamental and language based than the API names. Though there is a general correspondence between package and API names the groups of classes that make up a given API might cross packages. We primarily refer to classes in terms of their package organization in this text. Figure 2.11 describes some of the packages that are part of the Java standard class library. These packages are available on any platform that supports Java software development. Many of these