Eh algo que falta em Java, na minha opiniao.
Uma classe friend (amiga) eh uma classe que tem acesso a
methods e atributos privados de outra classe.
Ou seja, se a classe A eh amiga da classe B, e 'x' eh um 
atributo int privado em B, a pode fazer algo do tipo:

class A
{
    void m1()
    {
       B b = new B();
       b.x = 10;
    }
}

Isso faz uma falta de vez em quando. Eh uma pena que Java
nao promova a amizade entre as classes :-)

Silvio







--- MARCELO SOUSA LIMA <[EMAIL PROTECTED]> wrote:
> 
> O que é uma classe do tipo Friend?
> 
> 
> The information contained in this e-mail and in the
> attached files are for the
> exclusive use of the addressee herein nominated, and may
> contain trade secrets,
> privileged and other confidential information,protected
> by the applicable laws.
> In case you  are  not  the  right addressee,  you are
> hereby notified that any 
> reviewing,  reading,  copying and/or distributing of this
> e-mail's  content is 
> strictly prohibited and unauthorized.  Please, delete the
> e-mail's content and 
> notify the sender immediately. 
> Thank you for your cooperation.
> 


=====


------------------------------ LISTA SOUJAVA ---------------------------- 
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP 
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-------------------------------------------------------------------------

Responder a