Hi, I am a very beginner in Java. I have a simple class called contacts which is a class in a simple phonebook application. I would like to extend a class method to include an extra parameter in another class favorites. My attempt with my contact class below is giving errors. Can please someone help ?
************************************************** *****************************
/** * * */ // Contacts Class public class Contacts { public String name; public String phoneNumber; public String nickname; public Contacts(String name, String phoneNumber) { this.name = name; this.phoneNumber = phoneNumber; } class Favorites extends Contacts (String name, String phoneNumber,String nickname) { name = name; phoneNumber = phoneNumber; nickname = nickname; // } public String getName() { return name; } public String getPhoneNumber() { return phoneNumber; } public String getnickName() { return nickname; } }