I am getting the following error,"The static field IntegerSet.a should be accessed in a static way"
`public static IntegerSet union(IntegerSet setA, IntegerSet setB){
IntegerSet u = new IntegerSet();
for (int i=0;i <= CAPACITY; i++)
if (a[i]==true || setB.a[i]==true)//
u.a[i]=true;
return u;
My Class is as followed:
public class IntegerSet {
private static boolean[] a;
static final int CAPACITY=100;
My complier is saying that the .a[i] in seB.a[i] and u.a[i] are giving me problem. Read a little about the problem , the solution is to put class instead of the varible since its static but how?