Duration: 16 minutes
Summary: This video continues our discussion of control flow, exceptions and assertions. We specifically covered questions on assertions, for loops and exceptions. Assertions are typically enabled during testing but disabled during deployment. To enable assertions, we can use the -ea command-line flag. You can enable assertions on a class-by-class basis and package-by-package basis. We also discussed how it is not appropriate to use assertions to validate command-line arguments and change a program state. When it comes to exceptions, we discussed how an overriding method cannot throw a broader exception than the method it is overriding.