How to copy Set content to another HashSet ?

mujeres solteras de estados unidos en facebook recherche femme pour sortie amicale free online dating website uk rencontres femmes eure watch http://joetom.org/masljana/721 rencontre islamique belgique rencontre airsoft belgique chicos monsters ver online http://www.15m-acoruna.com/?privetys=conocer-gente-en-atenas&fc9=3a How to copy Set content to another HashSet?

Below example shows how to copy another collection object to HashSet object. By calling addAll() method you can copy another collection to HashSet object.

package HashSet;
 
import java.util.HashSet;
 
public class HashSetCopy {
 
    public static void main(String a[]){
        HashSet<String> hs = new HashSet<String>();
        //add elements to HashSet
        hs.add("Selenium");
        hs.add("Java");
        hs.add("QTP");
        System.out.println(hs);
        HashSet<String> subSet = new HashSet<String>();
        subSet.add("Perl");
        subSet.add("Ruby");
        hs.addAll(subSet);
        System.out.println("HashSet content after adding another collection:");
        System.out.println(hs);
    }
}

Output:
[Java, Selenium, QTP]
HashSet content after adding another collection:
[Java, Perl, Selenium, QTP, Ruby]