Can I invoke a java method other than main(String[]) from the command line?

后端 未结 8 529
夕颜
夕颜 2020-11-30 09:35

Can I invoke a java method other than main(String[]) from the command line?

8条回答
  •  既然无缘
    2020-11-30 10:17

    No you cant

    As per Java command line FAQ (which is dead now.) You can check Java Threads FAQ

    The entry point method main() is used to the provide a standard convention for starting Java programs. The choice of the method name is somewhat arbitrary, but is partly designed to avoid clashes with the Thread start() and Runnable run() methods, for example.

    Check the FAQ. You will get some good knowledge about JAVA command line

提交回复
热议问题