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. github管理代码

    1.首先去github官网申请一个账号 github官网 2.登录github,并新建一个库: 点击: 进去之后,这里填写库名,可以随便填写:  然后直接点击: 3.本地连接github 1)安装gi ...

  2. Asp.net中WebForm 与 MVC的架构区别

    ASP.NET Webform 后台代码(behind code) 这种behind code 模式有5个问题,我们用MVC的设计思想来分别解决这些问题 1.基于视图的方案来解决基于行为的需求 从上图 ...

  3. iOS-浅谈runtime运行时机制

      一.首先,从  runtime.h头文件中找到对 class 与 object 的定义  /// An opaque type that represents an Objective-C cla ...

  4. [Tex学习笔记]矩阵输入中的省略号

    \usepackage{enumerate,mathdots} $\iddots$

  5. 整理QQ数据库sql语句

    设置数据库的时候 qq 号如果用整型,设置成UNSIGNED,不然超过一定数值就错误 UPDATE `sao_qq` SET qq_num = REPLACE ( qq_num, '@qq.com', ...

  6. mvc view-controller mvc annotation-driven

    1.mvc view-controller 使页面直接通过某个连接跳转,不进过mvc handler 需要加一个配置 <mvc : view-controller path="/suc ...

  7. 洛谷P3371 【模板】单源最短路径

    P3371 [模板]单源最短路径 282通过 1.1K提交 题目提供者HansBug 标签 难度普及/提高- 提交  讨论  题解 最新讨论 不萌也是新,老司机求带 求看,spfa跑模板40分 为什么 ...

  8. 如何用js刷新aspxgridviw

    //写在js中 ASPxGridView1.Refresh();

  9. AngularJS图片上传功能的实现

    一.前言 前一段时间做项目时,遇到一个问题就是AngularJS实现图片预览和上传的功能,当时查阅文档(都是英文文档)折腾了很久才弄出来,现将整个流程整理出来,有需要的朋友可以参考一下,如果您有更好的 ...

  10. python3内置函数详解

    内置函数 注:查看详细猛击这里 abs() 对传入参数取绝对值 bool() 对传入参数取布尔值, None, 0, "",[],{},() 这些参数传入bool后,返回False ...