Eclipse is executing the wrong Java file

1. Please see that you have included the main() method in this class file.

2. If you still have the probs then right click on this java file in the package explorer and select Run

3. Keep the class name which contains your main() method, and the File name with which you save your file in Eclipse as SAME.

Its logicaloperators.java NOT logicaloperator.java......You have missed the "s"

Eg:

class logicaloperators{


      public static void main(String[] args){

   }
 }

Save it as logicaloperators.java


Check to see that your main() isn't capitalised.

Eclipse won't catch it, but if you run public static void Main(String[] args), it will run the wrong program.

Tags:

Java

Eclipse