Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.SortedSet;
import java.util.TreeSet;

public class Main {
    public static void main(String[] args) {
        // Create a sorted set of some names
        SortedSet<String> sortedNames = new TreeSet<>();
        sortedNames.add("Java");
        sortedNames.add("SQL");
        sortedNames.add("HTML");
        sortedNames.add("CSS");

        // Print the sorted set of names
        System.out.println(sortedNames);
    }

}