Shadowing, Overriding, Hiding and Obscuring
2011年03月01日
当子类属性与父类属性重叠时
这种叫法上是shadowing
最常见的例子就是应用于setter中,当然楼主提到的是子类对父类属性的shadow
int width;
. . .
public void setWidth(int width) {
this.width = width;
}
shadowing会容易造成迷惑,所以一般对shadowing持慎用态度
关于这个主题,分门别类大概有四种
Shadowing, Overriding, Hiding and Obscuring
1.shadowing 指属性的隐藏
2.overriding 指实例方法的覆盖,运行时可发生多态
3.hiding 指静态方法的覆盖,无多态
4.obscuring 是自定义变量名与系统中已存在类型重叠时
看一下这个: class A { static int MIN_PRIORITY = 59; }; public class Obscure { static A Thread; public static void main(String args[]) { // print value of class // variable Thread.MIN_PRIORITY System.out.println(Thread.MIN_PRIORITY); // print value of // java.lang.Thread.MIN_PRIORITY System.out.println(java.lang.Thread.MIN_PRIORITY); } }
referenced from: http://jroller.com/navanee/entry/shadowing_overrid ing_hiding_obscuring
发表评论
-
WebKit介绍及总结(一)
2012-01-20 01:15 652WebKit介绍及总结(一) 201 ... -
红黑树算法的实现与剖析
2012-01-20 01:15 577红黑树算法的实现与剖析 2011年03月28日 学无止境 ... -
深入static_cast运算符
2012-01-20 01:15 635深入static_cast运算符 2011年03月29日 ... -
动态规划算法
2012-01-20 01:15 676动态规划算法 2011年03 ... -
GPGPU将取代CPU?抢CPU “饭碗”
2012-01-20 01:15 625GPGPU将取代CPU?抢CPU “饭碗” 2011年03月 ... -
2011-3-25
2012-01-19 09:04 9282011-3-25 2011年03月25日 服务站会员注 ... -
WinCE驱动开发问题精华集锦(一)
2012-01-17 01:34 553WinCE驱动开发问题精华 ... -
关键字:volatile
2012-01-17 01:33 642关键字:volatile 2011年03月31日 并不是 ... -
bios英汗翻译
2012-01-17 01:33 620bios英汗翻译 2011年05月2 ... -
volatile――多线程
2012-01-17 01:33 525volatile――多线程 2011 ... -
计算机基础选择题(2)
2012-01-17 01:33 1553计算机基础选择题(2) 20 ... -
Apache Commons fileUpload实现文件上传(一)
2012-01-15 20:19 718Apache Commons fileUpload实现文件上传 ... -
mp3音乐文件上传外链空间精选合辑
2012-01-15 20:19 1041mp3音乐文件上传外链空 ... -
dwr+ajax和struts开发文件上传进度条
2012-01-15 20:19 847dwr+ajax和struts开发文件上传进度条 2010年 ... -
使用apache commons-fileupload.jar 实现文件上传
2012-01-15 20:19 694使用apache commons-fileupload.jar ... -
Struts2中使用uploadify上传文件组件
2012-01-15 20:19 790Struts2中使用uploadify上传文件组件 2009 ... -
1154_java
2012-01-11 12:22 6501154_java 2011年03月01日 impor ... -
Java 开发人员的 Scala 指南: 面向对象的函数编程
2012-01-11 12:22 604Java 开发人员的 Scala 指南: 面向对象的函数编程 ... -
Commons Pool组件
2012-01-11 12:22 685Commons Pool组件 2011年03 ... -
IT生活的血泪史
2012-01-11 12:22 563IT生活的血泪史 2011年03 ...
相关推荐
B-trees, Shadowing, and ClonesOhad Rodeh IBM Haifa Research LabsB-trees are used by many file-systems to represent files and directories. They provide guarantied logarithmic time key-search, insert, ...
关于无线信道的介绍,完整介绍了大尺度、小尺度产生原因、影响,以及LOS与非NLOS等产生的原因、影响
详细直观介绍了无线信道的各种衰落阴影的影响与原因,并做了比较
B-trees, Shadowing, and ClonesOhad RodehB-trees, Shadowing, and Clones – p.1/51Talk outline Preface Basics of getting b-trees to work with shadowing Performance results Algorithms for cloning ...
Here is a matlab code for describing the effect of shadowing in the wireless channel
Next, we propose a mathematical expression to define the effect of shadowing fading and an approach to computing it. Then, we optimize the effect of path loss through adapting the value of the path ...
shadowing and non-line-of-sight on indoor tracking using visible light}, year={2017}, volume={}, number={}, pages={501-506}, keywords={filtering theory ; free-space optical communication ; indoor ...
shadowing effects) and a path difference to the receiver exists. One of the major disadvantages of an OFDM based system is the characteristic high crest factor of the time domain signal. In ...
极限拟跟踪性质,张芳,周云华,本文主要研究微分同胚的极限拟跟踪性质。证明了任何拟部分双曲伪轨${x_{i},n_{i}}_{iin mathbb{Z}}$都存在一列点${y_{k}}_{kin mathbb{Z}}$能够$mathca
log normal shadowing radio propagation model:
3.5.2 Shadowing 90 3.5.3 Multipath fading 91 3.5.4 Performance analysis 95 3.6 Diversity 98 3.6.1 Combining modes 98 3.6.2 Arranging diversity branches 100 3.7 Multipath diversity and RAKE receiver ...
examples of screen-space techniques, shadowing, tessellation and geometry shaders, noise, and animation. The OpenGL Shading Language 4.0 Cookbook provides examples of modern shading techniques that ...
taking cross-tier power control, path-loss and shadowing effects into account. We show that a time-hopped CDMA physical layer coupled with sectorized receive antennas shows dramatic performance ...
Thermal images are not affected by lighting changes or shadowing, and are not overtly affected by smoke, dust or unstable backgrounds. However, thermal images lack color information which makes ...
The book details how to write vertex and fragment shaders, how to implement advanced rendering techniques such as per-pixel lighting and shadowing, and basic interaction techniques such as selecting ...
该方法基于Shadowing filter和牛顿定律的思想。 它仅使用噪声位置信息来最小化观测误差并估计过滤后的轨迹以及重建相应的加速度。 有关该方法的更多详细信息,请参阅以下手稿: “使用阴影滤波器算法跟踪一只鸽子”...
dimensional self-affine fractal random surface simulation, we use the optical scattering theory to calculate the deep Fresnel region speckle (DFRS) under consideration of the more strict shadowing ...
If Windows 10 Threshold 2 Update broke concurrent RDP sessions and RDPConfig.exe shows "Listening [not supported]", run update.bat which will automatically update rdpwrap.ini to support the latest ...
They are ideal for code shadowing to RAM, executing code directly from Dual/Quad SPI (XIP) and storing voice, text and data. The device operates on a single 2.7V to 3.6V power supply with current ...
C++ is a language that sets itself a bit apart from the rest....Function Shadowing Understanding the Destructor Operator Overloading Multiple Inheritance Casting Conversions and Promotions Name Lookup