The constructor Bucket(int) is undefined
I am trying to practice Java, I have a test on Wednesday.
When I try to write this:
Bucket arr= new Bucket;
arr = new Bucket(6);
The underlined text, new Bucket(6) is underlined in red, and the reason is: "The constructor Bucket(int) is undefined".
The class Bucket has no problems in its constructor, and it is imported to my class correctly.
The constructor of the Bucket class,
public Bucket (int capacity)
this.capacity = capacity;
this.currentAmount = 0;
requires only one int operator.
So what is the problem??
Please help me soon!!