Created
August 23, 2018 09:24
-
-
Save banghieudep/cec5d41c90cebad5b61f824718f4c7f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.TreeSet; | |
public class TreeSetExample { | |
public static void main(String args[]) { | |
// Tổng hợp tất cả những mẫu biển quảng cáo đẹp nhất hiện nay cho anh em cùng nhau tham khảo nhé | |
TreeSet<String> tset = new TreeSet<String>(); | |
// Adding elements to TreeSet<String> | |
tset.add("Bảng hiệu alu"); | |
tset.add("Bảng hiệu đẹp"); | |
tset.add("Bảng hiệu chữ nổi"); | |
tset.add("Bảng hiệu quảng cáo"); | |
tset.add("Biển quảng cáo công ty"); | |
tset.add("Thiết kế biển hiệu đẹp"); | |
//Displaying TreeSet | |
System.out.println(tset); | |
// TreeSet of Integer Type | |
TreeSet<Integer> tset2 = new TreeSet<Integer>(); | |
// Adding elements to TreeSet<Integer> | |
tset2.add(88); | |
tset2.add(7); | |
tset2.add(101); | |
tset2.add(0); | |
tset2.add(3); | |
tset2.add(222); | |
System.out.println(tset2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment