language: Java (sun-jdk-1.7.0_10)
date: 828 days 21 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<Integer> a = new ArrayList<Integer>();
        a.add(20);
 
        List<Integer> b = new ArrayList<Integer>();
        b.add(30);
 
        Set<Integer> set = new HashSet<Integer>(a);
        set.addAll(b);
 
        for (Integer o: set) {
            System.out.println(o);
        }
    }
}