Yel Chan

Greenhorn
+ Follow
since Jul 29, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yel Chan

Hi I'm new to Java and I badly need help on how to implement the Set interface below:

Set.java

public interface Set {

public Set union(Set S);

public void add(Object x);

}




I have this code:

Test.java

public class Test implements Set{

public Set union (Set A){

}

public void add(Object x){

}

public static void main (String args[]){

Set A = new MySet();


}

}



Can you help me on how the methods should be implemented. I wanted to add an array to Set A and add values on that array. Then I'm going to pass those array to the union method. Thanks much.
13 years ago