public class DSAStack
{
private int count;
private double[] stack;
public static final int default_capacity = 100;
public DSAStack()
{
this.stack = stack[default_capacity];
this.count = 0;
}
public DSAStack(int capacity)
{
this.stack = stack[capacity];
this.count = 0;
}
}
Eclipse recommended quick fix to make no change, simply highlights double[]
, probably a really stupid error but I can't figure it out.
I think you mean
this.stack = new double[default_capacity];
and also
this.stack = new double[capacity];
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments