点击运行
import java.util.*; public class HashSetDemo { public static void main(String args[]) { LinkedHashSet hs = new LinkedHashSet(); hs.add("B"); hs.add("A"); hs.add("D"); hs.add("E"); hs.add("C"); hs.add("F"); System.out.println(hs); } }
运行结果 :
正在执行...