Computer Applications

Which of the following statements will terminate the premature execution of a program?

  1. System.exit(0)
  2. break
  3. stop
  4. end

Java Iterative Stmts

32 Likes

Answer

System.exit(0)

Reason — As soon as System.exit(0) function is invoked, it terminates the execution, ignoring the rest of the statements of the program.

Answered By

20 Likes


Related Questions