Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Java provides two options for program termination: Runtime.exit() (this is equivalent to System.exit()) and Runtime.halt().

Runtime.exit()

Runtime.exit() is the typical way of exiting a program:

...