- 1

Assertion

Please I don’t understand can someone please explain it to me

12th Nov 2022, 7:44 PM
isaiah
isaiah - avatar
2 Answers
+ 1
An assertion is a condition that the programmer assumes to be true, otherwise the program cannot work correctly. If the assertion fails, the program stops with an error message. This is commonly used when writing test cases, but it is not a good practice to put it in normal code, because it can result in the irregular termination of the program.
13th Nov 2022, 4:39 AM
Tibor Santa
Tibor Santa - avatar
0
Thank u
13th Nov 2022, 10:12 AM
isaiah
isaiah - avatar