Re: ArraySet Intersection Method Question Programming Software Development by kezkez …trying to return an intersection of two arrayset strings. Say arrayset one has three strings "one&….out.println("-------Intersection------"); inter = (ArraySet<String>)one.setIntersection(four); System.out….next(ArrayIterator.java:42) at jss2.ArraySet.setIntersection(ArraySet.java:262) at Hw8p2.main(Hw8p2.java… ArraySet Question Programming Software Development by kezkez …, I am trying to return the union of two ArraySet Strings as a third; however, the compiler is complaining…: jss2.SetADT<java.lang.String> required: jss2.ArraySet<java.lang.String> union = one.union(two);…> one = new ArraySet<String>(); ArraySet<String> two = new ArraySet<String>(); ArraySet<String> un… Re: ArraySet Question Programming Software Development by kramerd You can cast the result to the appropriate type: [CODE] un = (ArraySet<String>)one.union(two); [/CODE] Re: ArraySet Question Programming Software Development by kezkez many thanks, i was casting all wrong before with un = one.union((ArraySet<String>)two); ArraySet Intersection Method Question Programming Software Development by kezkez … my question clearer. The setIntersection method is part of the ArraySet class. The main method is in Hw8p2. [CODE] public SetADT…> setIntersection (SetADT<T> set) { ArraySet<T> intersection = new ArraySet<T>(); for (int index=0; index… Re: ArraySet Intersection Method Question Programming Software Development by kezkez …> set) { //create set to hold intersection ArraySet<T> intersection = new ArraySet<T>(); //go through current set for… Generics - Union a Set Programming Software Development by BuhRock … int DEFAULT_CAPACITY = 100; private T[] contents; private int count; public ArraySet(int initialCapacity) { this.count = 0; this.contents = (T[]) …(new Object[initialCapacity]); } public ArraySet() { this.count = 0; this.contents = (T[]) (new Object[DEFAULT_CAPACITY]); } … Generics help Programming Software Development by BuhRock …int DEFAULT_CAPACITY = 100; private T[] contents; private int count; public ArraySet(int initialCapacity) { this.count = 0; this.contents = (T…[])(new Object[initialCapacity]); } public ArraySet() { this.count = 0; this.contents = (T[])(new Object[DEFAULT_CAPACITY]); } … extract values out of arraytolist Programming Web Development by tcv56 … the list in rpt builder? mytemplate.cfm <cfset temp = ArraySet(testarray,1,3,"")> <cfset testarray[1… Re: ArraySet Intersection Method Question Programming Software Development by apines Please describe the problem, what is your approach, and what are the results so far. Re: Generics - Union a Set Programming Software Development by ~s.o.s~ Not much details to help you out. Please post the shortest possible compilable code which showcases your problem and mention "what exact" errors or problems you are facing (with complete stacktrace or message if any). Re: Generics help Programming Software Development by stevanity Well, the method's look rather straightforward. Devise algorithms for remove, union and equals. That shouldn't be a big problem if you know basic looping and some knowledge of arrays... It just needs some thinking.. As for the iterator, what you can do is, you can create your own iterator class for your collection. Check out the Javadoc for …