This is my code:
import java.util.SortedSet;
import java.util.TreeSet;
public class Example9 {
public static void main(String[] args) {
SortedSet<String> s = new TreeSet<String>();
s.add("Practice");
s.add("Stack Overflow");
System.out.print(s);
}
}
I am getting the following error when I execute this program:
Error: Main method not found in class Example9, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
Can anyone please help me?