I am working on a program for class and I am stuck. When I try to compile the following code I receive and variable not found error. please help!
public class RingBuffer
{
public RingBuffer(int capacity){
double[] EmptyBuffer = new double[capacity];
System.out.print(EmptyBuffer.length);
}
public int size(){
int size = EmptyBuffer.length;
return size;
}
please note that I am getting an error with the size() method not being able to find the variable EmptyBuffer.