0

Can we execute a Java Program without having main() method in our program???

30th Aug 2017, 6:24 PM
Syed Tabarak
Syed Tabarak - avatar
5 ответов
+ 4
No you cannot. Static blocks are no longer supported without a main method.
30th Aug 2017, 7:48 PM
Rrestoring faith
Rrestoring faith - avatar
+ 2
Most probably not, Java VM needs to know where it should start for execution point. (Edit) Apparently I was wrong, look at @Ace's answer. Thanks @Ace, I didn't know that.
30th Aug 2017, 6:56 PM
Ipang
+ 2
😜
30th Aug 2017, 7:50 PM
Rrestoring faith
Rrestoring faith - avatar