I am trying to create a instance of the object Iset. When the person makes the object they have to give an int which will be the size of a boolean array that will store a set of
size variable in your constructor is a local variable, that's why other member methods doesn't get the right size to check.
size
Assign the value to this.size, then it will work:
this.size
ISet(int a) { this.size = a; seti = new boolean[size];