I hava a class called QGNode that extends GNode and a class QGraph that extends Graph. In QGNode constructor when I call super constructor with an argument ArrayList<QGNode> an error occurs. Am I misunderstand inheritance?
Here is my code:
0 public class QuestionGraph extends Graph{
1
2 public QuestionGraph(ArrayList<QGNode> nodes) {
3 super(nodes);
4 }
5 }
1 public class Graph {
2
3 ArrayList<GNode> nodes;
4
5 public Graph(ArrayList<GNode> nodes) {
6 this.nodes = nodes;
7 }
8 }
error occurs at line 3 and it's a syntax error and IDE suggest :
create method (java.Util.Arraylist) in QuestionGraph

