- Dec 15, 2003
- 540
- 0
- 0
what i'm doing is trying to build a class called Set
and i'm testing this class with another class...let's call it Test
in the class Test, i will initiate 2 arrays and have it passed to the class Set.
how do i do that?
let's say i have a method in class Set called manipulate and it is non-static
and the method will manipulate array1 and array2 and set it to array3
so it would look something like this in class Test: array3 = array1.manipulate(array2);
but what Type do i set array1, array2, and array3 to? i thought i was suppose to set them to type Set[] but it keeps giving me errors about incompatibility as i initiated array1 and array2 to a set of numbers, so it says something about "expecting int, found Set[]"
hope somebody gets what i'm saying, if not i'll be more than happy to elaborate on this
thx in advance
and i'm testing this class with another class...let's call it Test
in the class Test, i will initiate 2 arrays and have it passed to the class Set.
how do i do that?
let's say i have a method in class Set called manipulate and it is non-static
and the method will manipulate array1 and array2 and set it to array3
so it would look something like this in class Test: array3 = array1.manipulate(array2);
but what Type do i set array1, array2, and array3 to? i thought i was suppose to set them to type Set[] but it keeps giving me errors about incompatibility as i initiated array1 and array2 to a set of numbers, so it says something about "expecting int, found Set[]"
hope somebody gets what i'm saying, if not i'll be more than happy to elaborate on this
thx in advance
