language: Java (sun-jdk-1.7.0_10)
date: 829 days 19 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.*;
import java.lang.*;
 
class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        List a = new ArrayList();
        a.add(20);
 
        List b = new ArrayList();
        b.add(30);
 
        Set set = new HashSet(a);
        set.addAll( b);
 
        for (Object o: set) {
            System.out.println(o);
        }
    }
}
 
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.