How to run single Java file from a project in Eclipse?

前端 未结 7 836
慢半拍i
慢半拍i 2020-12-29 22:54

I want to run one Java file from a project in Eclipse. There is code to insert into database in that Java file, I want to check from that single file whether its working or

相关标签:
7条回答
  • 2020-12-29 23:36

    Sure, you just need a main function for any independent file.

    Create a class like so:

    public class HelloWorld
    {
        public static void main(String[] args) {
            System.out.println("Hello World");
    
        }
    
    }
    

    and run that.

    0 讨论(0)
提交回复
热议问题