On Jun 4, 11:40 am, [email protected] wrote:
> Hi All,
> I followed the lab exercise for Rewriting Interface under the topic Java 
> Interface and Abstract class of Java Programming with Passion. 
> In step 6 I got an error in PersonAnother2() that says "cannot find symbol 
> constructor Person()" is this coded this way on purpose ? Or is this really a 
> syntax error?
> Any help/comments will be appreciated.
> Thanks.
> THESE ARE THE CODES:
> package mypersoninterfaceproject;
> public class PersonAnother2 extends Person implements PersonInterfaceAnother{
>    
>    PersonAnother2(){
>        
>     }
Probably, parent does not have an empty constructor. One way to go is
to provide parameters to child's constructor. For example:
 PersonAnother2(<parameters>){
  super(<arguments to parameters>);
 }
>    
>     // Implement a new method
>     public void newMethod(){
>         // Some code
>     }
> }

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to