0

Hello, I'm creating a subclass from an already defined class. Let's say I have a class called Student and it has a default constructor. Now I want to create a child class of Student, but when I create it, it seems that it's taking the constructor instead of the actual class name

public class Member extends Student {
}

What can I do to fix this?

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by MrDiaz
0

class student looks like this

public class Student {
  int age;
  public Student (int age){
       this.age = age;
  }
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.