E mais facil do que vc pensa ;-)

basta usar :

   super.metodo();

simples assim ;-)

[]s Bulinha



On 8/13/05, Adriano de Oliveira Gonçalves - IsON <[EMAIL PROTECTED]> wrote:
> Blz,  valeu!
> ----- Original Message ----- 
> From: Domingos Neto 
> To: [email protected] 
> Sent: Sunday, August 14, 2005 3:22 PM
> Subject: Re: [JUG-Petro] Chamar método da classe pai
> 
> Eh possivel mas voce deve chamar super.meuMethodo();
> ----- Original Message ----- 
> From: Adriano de Oliveira Gonçalves - IsON 
> To: [email protected] 
> Sent: Saturday, August 13, 2005 9:33 AM
> Subject: [JUG-Petro] Chamar método da classe pai
> 
> Olá,
> Gostaria de saber se no Java é possível, em uma classe que extende outra,
> dentro de um método que eu estou reescrevendo, chamar um metodo da classe
> pai, como no PHP. Por exemplo:
>  
> public class classePai {
>  
>     public meuMetodo()
>     {
>         System.out.println("oi");
>     }
> }
>  
> public class classeFilho extends classePai{
>  
>     public meuMetodo()
>     {
>         System.out.println("Novo oi\nAgora vou imprimir o 'oi' antigo:\n");
>         
>         parent::meuMetodo(); // <- Isso seria possível?
>     }
> }
>  
>  
>  
>  
> Valeu!
>  
>  
> Adriano
> 
> 
> SPONSORED LINKS 
> C programming language Java programming language The c programming language 
> C programming language List of programming languages Java 
> ________________________________
> YAHOO! GROUPS LINKS 
> 
>  Visit your group "jug-petropolis" on the web.
>   
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>   
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>   
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> ________________________________
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hgiddqn/M=362335.6886445.7839731.1510227/D=groups/S=1705006905:TM/Y=YAHOO/EXP=1123995348/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/jug-petropolis/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Atrašyti