Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.LinkedHashSet;

public class Main {
    public static void main(String[] args) {
        LinkedHashSet<Integer> lhashSet = new LinkedHashSet<Integer>();

        lhashSet.add(new Integer("1"));
        lhashSet.add(new Integer("2"));
        lhashSet.add(new Integer("3"));

        Object[] objArray = lhashSet.toArray();

        for (Object inte : objArray) {
            System.out.println(inte);
        }
    }
}