登录
首页 » Java » ClassMemeberPriviledge

ClassMemeberPriviledge

于 2013-04-01 发布 文件大小:1KB
0 154
下载积分: 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 个回复

  • utilities
    Object proxy Type Source Code for Java Script.
    2014-02-13 21:55:51下载
    积分:1
  • JAVA
    北京邮电大学牛导的 JAVA课件课件及相关资料,包括语言部分的讲稿,虚拟机使用说明等(Beijing University of Posts and Telecommunications cattle mediated JAVA courseware courseware and related information, including part of the script language, virtual machine instructions, etc.)
    2008-02-08 15:35:05下载
    积分:1
  • GeoSms
    说明:  使用anydata芯片组,安装标准扩展短消息协议编写的类,可以直接发送,接受短消息(use anydata chipset, install standard expansion Short Message agreement prepared by category, can be directly sent, accept Short Message)
    2006-04-17 01:14:07下载
    积分:1
  • java-fifty--code
    java 的基础知识 包含了java的几乎所有的支持点 对初学者非常有用(basic knowledge of key points in java)
    2012-04-24 10:31:11下载
    积分:1
  • SSM-DB2
    SSM(struts2+spring+mybatis+db2整合案例)(SSM (struts2+spring+mybatis+db2 integration scenarios))
    2013-10-10 09:40:08下载
    积分:1
  • sqlite
    基于安卓系统的数据库使用源代码教程,编译验证可行(Android-based tutorial database using the source code, compile proven feasible)
    2013-11-07 20:22:52下载
    积分:1
  • 4GuessNumber
    给你一个1至100之间的整数,请猜测这个数(Java GuessNumber give you a 1 to 100 between integer, please guess the number Java )
    2012-04-03 16:05:24下载
    积分:1
  • ssd7_Ex4
    this is answer for ssd7 exercise 4
    2013-10-13 17:34:41下载
    积分:1
  • Kmeansone
    Kmeans 算法的基本JAVA实现。可以实现聚类的功能。(kmeans ALGORITHM using JAVA)
    2015-09-23 16:38:04下载
    积分:1
  • CalendarGuess
    java版本的万年历,可以显示当前时间,如当前年、当前月、当前日、当前小时、当前分钟等等(java java java java java java java java java java java java java java java java java java java java java )
    2013-11-27 16:17:12下载
    积分:1
  • 696518资源总数
  • 105651会员总数
  • 15今日下载