Horje
Sets Code Example
sets
 
DaysA = set(["Mon","Tue","Wed"])
DaysB = set(["Wed","Thu","Fri","Sat","Sun"])
AllDays = DaysA|DaysB
print(AllDays)
Sets
// Java program Illustrating Set Interface
 
// Importing utility classes
import java.util.*;
 
// Main class
public class GFG {
   
    // Main driver method
    public static void main(String[] args)
    {
        // Demonstrating Set using HashSet
        // Declaring object of type String
        Set<String> hash_Set = new HashSet<String>();
 
        // Adding elements to the Set
        // using add() method
        hash_Set.add("Geeks");
        hash_Set.add("For");
        hash_Set.add("Geeks");
        hash_Set.add("Example");
        hash_Set.add("Set");
 
        // Printing elements of HashSet object
        System.out.println(hash_Set);
    }
}




Java

Related
Write program for problem 1 such that every regex runs as its own thread in java Code Example Write program for problem 1 such that every regex runs as its own thread in java Code Example
jtable fill panel Code Example jtable fill panel Code Example
android java seekbar Code Example android java seekbar Code Example
java code for scientific calculator GUI Code Example java code for scientific calculator GUI Code Example
running test from maven vs cucumber test runner Code Example running test from maven vs cucumber test runner Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12