Why use assertions if I can just check a condition and throw an exception?
I understand that assertions check things that should be true, but an if statement can check the same condition. When would I use an assertion instead of an…
I understand that assertions check things that should be true, but an if statement can check the same condition. When would I use an assertion instead of an…