Hi,

in javase_interface/index.html#Exercise_5

There is a code

6. Write PersonAnother2.java.  The PersonAnother2 class extends Person class 
and implements only PersonInterfaceAnother interface. This is an example of 
new code that uses only the new interface but not  the old interface. 



package mypersoninterfaceproject;

// This is an example of new code that uses only the new interface but not  
the old interface. 
public class PersonAnother2 extends Person implements 
PersonInterfaceAnother{
    
    PersonAnother2(){
        
    }
    
    // Implement a new method
    public void newMethod(){
        // Some code
    }
}

but I believe it should be rather...

public PersonAnother2(int cashSavings, int retirementFund, String 
firstName, String lastName) {        super(cashSavings, retirementFund, 
firstName, lastName);    }

or you will get error in NetBeans IDE...
--
Martin

-- 
You received this message because you are subscribed to the Google Groups 
"JPassion.com: Java Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/jpassion_java.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to