Difference Between abnormal and normal termination in java
Answers
Answered by
1
Answer:
In every operating system exit with a return value. Most of the cases it is either 0 successful completion and 1 or any larger or smaller value for unsuccessful completion. Destructor nothing to do with return with 0 or 1. Destructor is to release memory inside a programed to avoid memory leak or proper memory management. Hence destructor is nothing to do with exit status of a program. To know whether a program executed successfully or not we can check like below:-
In UNIX you can check the value of $? whether process successful or not. It will return 0 if successful and 1 or a larger value to indicate that process failed.
To check a exit status of a process in Windows o/s we use
Explanation:
mark as brainlist
Similar questions