Witscale Test Center

 


 


 

 

Text Box: 5
Flow control, Assertions 
&
Exception Handling


This chapter covers…

Ñ	Controlling the execution flow with the conditional statements (if, if-else and switch)
Ñ	Controlling the execution flow with the iterative statements (while,do-while and for)
Ñ	Iterrupting the flow (of execution) with break and continue
Ñ	Handing errorneous conditions with exceptions (try-catch-finally)
Ñ	Throwing exceptions for known erroneous condition (throw)
Ñ	How and why to use assertions
Ñ	The assert statement and AssertionError class
Ñ	Enabling and disabling assertions at runtime

The SCJP Handbook