Homeinterview java questions Is it possible to execute a program without defining a main() method? September 18, 2023 0 No, with Java 7 onwards, you need a main() method to execute aprogram. In earlier versions of Java, there was a workaroundavailable to use static blocks for execution. But now this gap hasbeen closed You Might Like View all
Post a Comment