Member Type Declarations
A member class is a class whose declaration is directly enclosed in another class
or interface declaration. Similarly, a member interface is an interface whose declaration is directly enclosed in another class or interface declaration. The scope
of a member class or interface is specified in .
A member class is a class whose declaration is directly enclosed in another class
or interface declaration. Similarly, a member interface is an interface whose declaration is directly enclosed in another class or interface declaration. The scope
of a member class or interface is specified in .
- If the class declares a member type with a certain name, then the declaration
of that type is said to hide any and all accessible declarations of member types
with the same name in superclasses and superinterfaces of the class.
Within a class C, a declaration d of a member type named n shadows the declarations
of any other types named n that are in scope at the point where d occurs.- If a member class or interface declared with simple name C is directly
enclosed within the declaration of a class with fully qualified name N, then the
member class or interface has the fully qualified name
.
- A class inherits from its direct superclass and direct superinterfaces all the non-private member types of
the superclass and superinterfaces that are both accessible to code in the class and
not hidden by a declaration in the class. - A class may inherit two or more type declarations with the same name, either
from two interfaces or from its superclass and an interface. - A compile-time erroroccurs on any attempt to refer to any ambiguously inherited class or interface by
its simple name
0 comments:
Post a Comment