Differentiate between break and System.exit(0).
Answers
Answered by
57
break
break is a keyword in C.
break causes an immediate exit from the switch or loop (for, while or do).
break is a reserved word in C; therefore it can't be used as a variable name.
exit(0)
exit() is a standard library function.
exit() terminates program execution when it is called.
exit() can be used as a variable name
zephanphilip03:
its the correct answer
Answered by
44
The word 'break ' is used to exit any loop or any switch case...
System.exit(0); is used to end a program.
Similar questions