Object Oriented Programming with D Language. Private access specifier.

Bruno Medeiros brunodomedeiros+spam at com.gmail
Mon Aug 25 09:46:35 PDT 2008


Christopher Wright wrote:
> You can't have two top-level classes in 
> one file, though; you need another class to act as a namespace for them.
> 

Surprisingly, you can have more than one top-level class in a Java file. 
    But only one can be public, the others have default protection, and 
are not accessible from outside the file.
(I've only found this out recently, some months ago, even though I've 
programming in Java for quite longer)


-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list