Computer Science, asked by Akshayji7818, 11 months 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