Teen Programmers Unite  


Return to forum top

cannot resolve symbol error when extending

Posted by confission [send private reply] at September 28, 2002, 10:24:06 PM

i'm trying to extend a class and i keep getting this error:

c:\codes\DiagonalToTridiagonal.java:7: cannot resolve symbol
symbol : constructor DiagonalMatrix ()
location: class dataStructures.DiagonalMatrix
public class DiagonalToTridiagonal extends DiagonalMatrix

the DiagonalMatrix class file is in the dataStructures folder, and i don't understand why there would be an error, or what the error is. when i extend from other classes, such as ArrayLinearList, i don't get the error. i seem to only get the error when i extend from a class that isn't implemented from an interface. so how do i extend from a class which isn't implemented from an interface? how can i extend DiagonalMatrix with DiagonalToTridiagonal without getting an error? i would greatly appreciate it if anyone can help; this problem is driving me crazy.

the following is my code:

package dataStructures;
import java.util.*;
import utilities.*;

public class DiagonalToTridiagonal extends DiagonalMatrix
    public TridiagonalMatrix transformToTridiagonal()
    TridiagonalMatrix MyTridiagonalMatrix=new TridiagonalMatrix(this.rows, this.element[rows-1]);
    for(int i=0; i<this.rows; i=i++)
        Computable x=(Computable) this.element;
    return MyTridiagonalMatrix;
Posted by Psion [send private reply] at September 29, 2002, 10:21:02 AM

It sure looks like the problem is that you didn't give DiagonalMatrix a default constructor, so you can't create it without parameters.

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.