I have a class of Line and a fit constructor.
I defined:
Line l1 = new Line("A", "B");
I have a class ts, that has a member: Vector<Line> allLines = new Vector<Line>();
I want to add the line l1 into this vector..
I tried three options but it doesn't work:
ts.allLines.addElement(l1);
but I got the error:
The method addElement(Line) in the type Vector<Line> is not applicable for the arguments (Line)
ts.allLines.add(l1);
but I got:
The method add(Line) in the type Vector<Line> is not applicable for the arguments (Line)
but it doesn't work.
 
     
     
     
    