This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Correct me if I'm wrong, but AWT stands for Abstract Windowing Toolkit... All of the GUI components (e.g. windows and buttons) are designed to utilise native code, hence displaying like your normal windows under any OS (i.e. in Windows, they will display as normal Windows windows do [that phrase is confusing!], and under Linux they will display in a Linux-style format). Often now, many programmers use the Swing components (in package javax.swing), as they supply additional and improved components - and will always display the SAME across any platforms. Assertions are used (as any concurrent programmer of J2SE 1.4 will tell you) to verify that certain statements that MUST BE TRUE are met, or that points in code that should never be reached are not... For example, suppose that you have a switch statement, and the int passed as the argument should match one of the cases exactly. You may use an assertion in the default case, to verify that if the code is reached, the program will terminate (as technically it should never be reached). They may also be used to verify that a particular variable or method returns a value that MUST be correct. Note that assertions are disabled by default, to enable backward compatibility with code that used variable names (identifiers more technically) called 'assert'. The structure of an assert statement is effectively: assert <statement> : <message>; If the <statement> returns the boolean value false, the program (assuming assertions enabled) will terminate, with an optional String message <message>. There are several APPROPRIATE uses of assertions, and uses which are NOT - certainly this is required information for the SCJP 1.4 exam.
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )