登录
首页 » Java » ClassMemeberPriviledge

ClassMemeberPriviledge

于 2013-04-01 发布 文件大小:1KB
0 229
下载积分: 1 下载次数: 3

代码说明:

  实现一个程序,对用户输入的类权限、成员权限、以及使用该类对象的环境与这个类的关系,判断这个环境中能不能访问这个类的这个成员。 4. 背景知识介绍:对类成员的访问权限由3个方面决定:(1)类的访问权限(public或default),(2)成员变量的访问权限(public, protected, default或private),以及环境与类的相互关系(同类SameClass,同包不同类SamePackageNoteSameClass,不同包但为子类OtherPackageSubClass,不同包非子类OtherPackageNotSubClass)。例如,如果一个类A是public的,它的一个成员变量x是protected的,则这个成员变量的访问权限是default的,试图访问这个类的一个运行环境与A的关系是OtherPackageSubClass,则这个环境中能够访问变量x。(Implement a program, the relationship between the classes of permissions, user input member permissions, as well as the environment of use of such objects of this class, it is judged in this environment can not access this members of this class. 4. Background knowledge: the access rights of the class members decided by three aspects: (1) access rights (public or default), (2) the member variable access rights (public, protected, default or private), as well as environmental and the relationship of the class (of similar SameClass, same package different classes SamePackageNoteSameClass, different packages, but for subclass OtherPackageSubClass, different package non-subclass OtherPackageNotSubClass). For example, if a class A is public, it s a member variable x is protected, the access rights of the member variables is default, tries to access a runtime environment for this class A relationship is OtherPackageSubClass this environment be able to access the variable x.)

文件列表:

ClassMemeberPriviledge.java,2450,2009-10-14

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Randomintgenerator
    Randomintgenerator.java is a java example to practice your java programming
    2009-06-03 19:36:54下载
    积分:1
  • 我封装的okhttp
    这是一款我封装的okhttp3,自动管理cookies,get,post,json请求和自动解析json功能,内附案例(This is a okhttp3 encapsulated by me, which automatically manages cookies, get, post, JSON requests and automatic parsing JSON functions.)
    2018-04-21 20:25:17下载
    积分:1
  • stackaqueue
    java 实现的基础数据结构栈和队列,仅供有需要的同学参考(java code of stack and queue )
    2014-03-25 13:21:37下载
    积分:1
  • BlockComboBox
    利用Swing组件在弹出式菜单项间画分隔线(Drawing split line in Popumenu by java swing.)
    2001-01-20 11:53:29下载
    积分:1
  • mywork
    自己写的java小程序,包括一个邮件界面,并对界面上的控件进行监控,对事件反应并通过命令提示符显示出来(Write their own Java applets, including an e-mail interface, the controls and interface monitoring, incident response and displayed through the command prompt)
    2012-04-02 17:16:28下载
    积分:1
  • java socket入门 实例源码下载
    很简单的java socket例子 需要用到mysql数据库
    2015-05-21下载
    积分:1
  • 类似于备忘录、日记本之类的项目 DiaryTest
    类似于备忘录、日记本之类的项目,仅供学习(Items like memorandums, diaries ,etc For learning only)
    2020-06-22 08:40:01下载
    积分:1
  • JAVA-mianshi
    java程序员参考资料,JAVA的一些基本内容(java programming materials,reference of JAVA development test)
    2011-12-15 13:28:54下载
    积分:1
  • thumbnail
    搭建springmvc项目基本框架,用到的Jar,以及文件配置(springmvc building and user Jar files and file configuration)
    2020-06-20 18:00:01下载
    积分:1
  • StringUtil
    java字符串完全转换,包括所有字符类型。(java string completely converted, including all types of characters.)
    2012-08-14 22:52:41下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载