Computer Science, asked by Akshayji7818, 1 year ago

How to execute a static block without main method in Java?

Answers

Answered by omegads04
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