Java Reference
In-Depth Information
static class Why {
static String z = "Black";
}
static See y = new See();
}
class See {
String z = "White";
}
In summary, obey the standard naming conventions to avoid conflicts between different
namespaces (and because your program will be illegible if you violate these conventions). Also,
avoid variable names that conflict with common top-level package names, and use MixedCase for
class names even if they are acronyms. By following these rules, you'll ensure that your programs
never obscure class or package names. Yet again, this is a case of the general rule that you should
avoid name reuse except for overriding. For language designers, consider eliminating the possibility
of obscuring. C# does this by putting fields and nested classes into the same name space.
< Day Day Up >
 
 
Search WWH ::




Custom Search