code written in java on eclipse environment

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



code written in java on eclipse environment



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 an error when I run this code. The error looks like this:



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?





how did you execute this class?
– ambarox
3 mins ago





I suggest you clean the project completly (Something like "Project > Clean...") See the duplicate to understand why this could solve your case.
– AxelH
2 mins ago






Possible duplicate of Function of Project > Clean in Eclipse
– AxelH
1 min ago




1 Answer
1



Your code seems to be running fine.



I just ran it and it seems ok.



Could you try making a new eclipse project, and clicking run on the new class?



enter image description here






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard