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

📅  最后修改于: 2022-03-11 14:58:25.687000             🧑  作者: 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