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. ThinkPad E440 Ubuntu 13.1无线网卡 RTL8723BE 驱动解决办法总结

    方法一.在使用网线链接到情况下 第一步.执行下边到命令,即从github上下载驱动程序并安装 sudo apt-get install linux-headers-generic build-esse ...

  2. view抖动效果

    1.使用属性动画 ViewPropertyAnimator.animate(webView).translationX(20).setInterpolator(new CycleInterpolato ...

  3. No.2__C#

    几经波折——多事之秋的第二周 这周的事情还有点多, 应该已经是上周了确切的说.总的来说,上周的数据结构的学习进行的很顺利.最让自己惊喜的是,居然很快就派上了用场,这也坚定了我学习的信念,极大地鼓舞了我 ...

  4. Mono addin 学习笔记 4 再论数据扩展点(Data only extension point)

    1. Attribute声明方式 定义扩展属性 [AttributeUsage(AttributeTargets.Assembly, AllowMultiple= true)] public clas ...

  5. eclipse报错 :java was started but returned exit code=13

    一个礼拜没打开自己电脑上的eclipse,一打开居然报错,错误提示如下: cdm运行一下Java -version和javac 运行javac时报错,错误提示如下: 然后发现jdk的bin下没有dt. ...

  6. teamviewer 过期解决办法

    参考资料: http://blog.csdn.net/z249683156/article/details/41842271

  7. 第五百八十二天 how can I 坚持

    好吧,是我错了,昨天,做好自己就行了,别人怎么样是别人的事,永远保持一颗单纯向上的心. 时间过得真快,明天又周六了.. 睡觉.

  8. Spark 集群安装

    一.安装jdk 二.安装scala 三.安装Spark 1.解压 tar -zxvf spark-1.5.1-bin-hadoop2.6.tgz 2.cp spark-env.sh.template ...

  9. C语言中的union

    1.union中可以定义多个成员,union的大小由最大的成员的大小决定. 2.union成员共享同一块大小的内存,一次只能使用其中的一个成员,与struct形成鲜明对比. 3.对某一个成员赋值,会覆 ...

  10. redis info参数详解

    redis 127.0.0.1:6381> info redis_version:2.4.16                                  # Redis 的版本redis ...