* Chapter 6 Access Control * Why Java support Access Control Machine Language Assembly language * Why Java support Access Control “separating the things that change from the things that stay the same.” * Why Java support Access Control Access Control “separating the things that change from the things that stay the same.” * Why Java support Access Control Public Protected Private Package import Access Control * Package: the library unit Import Statement * Package: the library unit .java Only one public class class class .class .class .class compilation unit public class: There can be one and there can be only one in each compilation unit. public class name: the same name as the file (including capitalization, but excluding the .java filename extension). additional classes: support main public class. * Package: the library unit
library
If you use a package statement, it must appear as the first noncomment in the file. Note that the convention for Java package names is to use all lowercase letters, even for intermediate words. * Package: the library unit
* Package: the library unit Package \net\mindview\simple\ C:\DOC\JavaT\net\mindview\simple\ C:\DOC\JavaT\net\mindview\simple\ Java interpreter CLASSPATH .class file directory
Java程序设计英文版课件:ch6 Access Control 来自淘豆网m.daumloan.com转载请标明出处.