I thought this might be a good
thread to start.
Triggers to look for in code example
test questions: Doug said that he looks for triggers in the code examples to immediately draw him toward a syntax error or non compilation issue.
Copied from his post in another topic:
- wait(), join(), sleep() : Look for try/catch block to catch InterruptedException.
- case: x : Look for x as non-final variable... Compiler error.
- [top level class] : Look for any other access modifier besides public and [default access]... Compiler error.
- [non-anonymous, method-local, inner class] : Look for semi-colon at closing bracket. If not there... Compiler error.
- ["final" base class method] : Look for shadowing in child method, access from child method.
- [Wrapper Class].[Any Method] : SUPER CLOSE SCRUTINY! could be NFE Error, incorrect return type.
Does anyone else have any good triggers?