g_hadgraft
04-26-2005, 07:21 PM
Im having some trouble with my java code i have a class which creates an abstract data type, this class is then used from another class using this line
IntArrayBag bag1 = new IntArrayBag();
The constructor this is using from the first class is
public class IntArrayBag implements Cloneable
{
int[] data;
int capacity;
int presentItems;
public IntArrayBag()
{
data=new int[10];
presentItems=0;
}
}
This is not the whole class just the constructor this line uses.
However the problem with this code is that it throws up the error cannot resolve symbol class IntArrayBag
IntArrayBag bag1 = new IntArrayBag();
The constructor this is using from the first class is
public class IntArrayBag implements Cloneable
{
int[] data;
int capacity;
int presentItems;
public IntArrayBag()
{
data=new int[10];
presentItems=0;
}
}
This is not the whole class just the constructor this line uses.
However the problem with this code is that it throws up the error cannot resolve symbol class IntArrayBag