Regards<BR>Farrukh Mahmud
Regards<BR>Farrukh Mahmud
"JavaRanch, where the deer and the Certified play" - David O'Meara
The body of a class declares members (fields and methods and nested classes and interfaces), instance and static initializers, and constructors (�8.1.5). The scope (�6.3) of a member (�8.2) is the entire declaration of the class to which the member belongs. Field, method, member class, member interface, and constructor declarations may include the access modifiers (�6.6) public, protected, or private. The members of a class include both declared and inherited members (�8.2). Newly declared fields can hide fields declared in a superclass or superinterface. Newly declared class members and interface members can hide class or interface members declared in a superclass or superinterface. Newly declared methods can hide, implement, or override methods declared in a superclass or superinterface.
If the class declares a field with a certain name, then the declaration of that field is said to hide any and all accessible declarations of fields with the same name in superclasses, and superinterfaces of the class. The field declaration also shadows (�6.3.1) declarations of any accessible fields in enclosing classes or interfaces, and any local variables, formal method parameters, and exception handler parameters with the same name in any enclosing blocks.
If a field declaration hides the declaration of another field, the two fields need not have the same type.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Bring out your dead! Or a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|