+ 5
Can't I use int main() in java?
recently I observed using int main() with return 0 shows an error in Java
2 Answers
+ 3
in java it has to be void.
the return in main() in other programming languages returns a value to check the status of the exit.
in java you can use System.exit()