To class contains:

  private: Just for the class of which defined it.

  default: For the class of which defined it and the class that in the same package.

  protected: For the class of which definded it and the class that in the same package and the class inherited from it.

  public: Anywhere can get it and use it.

Tip:

  When A class extend B class and B contain private members, A has the private members that inherited from B, but cannot use them.

To class:

  Only public and default can use.

  public: anywhere

  default: must in the same package

 

Modifier的更多相关文章

  1. [转]Java反射之如何判断类或变量、方法的修饰符(Modifier解析)

    Java针对类.成员变量.方法,有很多修饰符,例如public.private.static.final.synchronized.abstract等,这些修饰符用来控制访问权限或其他特性. 本文就用 ...

  2. jmeter 中的 HTTP URL Re-writing Modifier

    URL rewriting modifier,因为tomcat的session实现不是通过cookie的,而是通过session id的,就是说,用户登录有了session之后,tomcat就会维护一 ...

  3. 【转载】#273 - Parameter Modifier Summary

    Here's a summary of the different parameter modifiers and how the behavior changes for each, when us ...

  4. 解决Deprecated: preg_replace(): The /e modifier is deprecated, use

    使用php5.5运行ecshop的时候出现如下错误Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace ...

  5. 7.modifier插件的自定义和使用

    1.在plugins下面创建一个文件 modifier.changeDate.php 编写: <?php function smarty_modifier_changeDate($utime,$ ...

  6. Sample Code for Qp_preq_pub.Price_request Api to Simulate an Ask for Promotion Modifier

    DECLARE p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE; p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE; p_line_attr_tbl ...

  7. java反射(java.lang.reflect)---java.lang.reflect.Modifier中状态码

    1. 详情请看jvm(虚拟机)规范 java.lang.reflect.Modifier public static final int ABSTRACT 1024 public static fin ...

  8. An entry point cannot be marked with the 'async' modifier

    I copied below code from this link.But when I am compiling this code I am getting an entry point can ...

  9. [原][粒子特效][spark]调节器modifier

    深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group添加modifier的方式: modifier An abstra ...

  10. nagiosQL访问时报错PHP message: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

    nagiosQL安装环境: CentOS release 6.4 (Final) php-5.5.4 nagiosql_320 nginx version: nginx/1.2.3 安装一切正常,当访 ...

随机推荐

  1. Hadoop 2.6.4单节点集群配置

    1.安装配置步骤 # wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm # rpm -i ...

  2. 【转】CSS z-index 属性的使用方法和层级树的概念

    文章转自:CSS z-index 属性的使用方法和层级树的概念,另外加了一点自己的注释 CSS 中的 z-index 属性用于设置节点的堆叠顺序, 拥有更高堆叠顺序的节点将显示在堆叠顺序较低的节点前面 ...

  3. RestTemplate

    RestTemplate是Spring提供的用于访问Rest服务的客户端,RestTemplate提供了多种便捷访问远程Http服务的方法,能够大大提高客户端的编写效率.调用RestTemplate的 ...

  4. 64. ZigZag Conversion

    ZigZag Conversion The string "PAYPALISHIRING" is written in a zigzag pattern on a given nu ...

  5. C++引用与指针

    在做函数参数时, 引用不可以设置默认值, 指针可以 void fun(const string& url,  string* domain = NULL); 另const放在函数后面, 表示这 ...

  6. using

    using关键字有两个主要用途: 作为指令,为命名空间创建别名或导入其他命名空间中的类型. 作为语句,定义一个范围,在此范围的末尾将释放对象. using指令 using指令有两个用途: 导入其他命名 ...

  7. ubuntu 清除缓存

    2013-03-31 10:20 sudo apt-get autoremove //自动卸载不使用的内容 sudo apt-get autoclean //自动清理,但不会删除用于安装而下载的临时文 ...

  8. uploadify图片上传发生Security Error

    今天在使用uploadify进行图片上传的时候出现security error.其根本原因是flash跨域问题.主要原因是因为配了两个域名www.ttyouni.com 和 ttyouni.com 在 ...

  9. NHibernate系列文章三:简单的增删改查询

    摘要 上一篇文章只完成了简单的NHibernate安装.配置和连接数据库.这篇文章介绍怎样实现最简单的数据库读写操作. 1. 重构ISessionFactory生成过程 将生成ISessionFact ...

  10. C#winform如何最小化主窗口

    1.如果不想让程序在任务栏中显示,请把窗体的属性ShowInTaskbar设置为false;2.如果想让程序启动时就最小化,请设置窗体的属性WindowState设置为Minimized.(Minim ...