CSDN博客

img Miracle04

TIJ swot_JAVA的初学者(三)

发表于2004/9/15 7:00:00  709人阅读

1.3 The hidden implementation

Access control enables users to solve their particular problems without thinking about the inner construction. Also, it allows the programmer to update the internal working without worrying about how the change will affect the client programmer.

Java has three keywords to set the boundaries: public, private and protected.

protected acts like private, except that an inheriting class has access to protected members, but not private members.

"friendly" access allows classes to access the friendly members of other classes in the same package.

 

0 0

相关博文

我的热门文章

img
取 消
img