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
Computer Science,
7 months ago
English,
7 months ago
Science,
7 months ago
Math,
1 year ago
Math,
1 year ago