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,
6 months ago
Math,
6 months ago
Chemistry,
6 months ago
Math,
1 year ago
Math,
1 year ago