How to execute a static block without main method in Java?
Answers
Answered by
0
If you put a System.exit(0) at the end of the static -block, it will run with no errors in Java.
Similar questions