Here is my code. I am not sure how to exit the program using a return value. Any ideas? THis is the last step from my assignment. Important areas are marked with /////// I h
As long as you don't need to return custom exit code (other than 0, as returned by System.exit(0)
) and don't start new threads, you can terminate your program by doing
return;
in your main()
method. Note that there is no value returned, so that you don't need to change your main()
method from void
to int
.