this
when methods are invoked on object instances,
inward and outward as global or static variables, etc.
for
loops are best broken out into three separate
clauses, as the initialiser is executed before the conditional is
evaluated, and the update clause is executed after the
loop body.
cat
’.
The somewhat illegible diagrams contained in this lecture all come from P&Y; you can either zoom the PDF to see them in better detail, or take a look at the book itself.
assertTrue
and assertFalse
methods
work, particularly the two-argument ones: the message is only
displayed when the assertion fails, so it's there as an aid to
you in order to help you understand why the test failed
— so write clear messages!
fail()
.
Version 1.25, 2009/03/20 18:22:26
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Logging and Cookies Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |