📌  相关文章
📜  我们可以在没有 main() 方法的情况下执行程序吗?无论代码示例

📅  最后修改于: 2022-03-11 14:55:10.950000             🧑  作者: Mango

代码示例1
Yes, one of the ways to execute the program without the main method is 
 using static block
 
 What if the static modifier is removed from the signature of the main method??
 
 Program compiles. However, at runtime, It throws an error "NoSuchMethodError