Computer Applications
Which of the following statements will terminate the premature execution of a program?
- System.exit(0)
- break
- stop
- 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
Which of the following for loop will not be an infinite loop?
- for(; ;)
- for(a = 0; a < 1; a--)
- for(a = 0; ; a++)
- for(a = -1; a < 1; a++)
Choose the odd one out from the following:
- return
- break
- continue
- if-else
The while statement repeats the execution of a block only when the given condition is:
- False
- True
- 1
- 0
Which of the following is not a part of the looping construct?
- close
- for
- break
- continue