Skip to content

Chapter 45: Preventing NullPointerException

45.1 Why do we need null?

45.2 Comparing string variable with a string literal

45.3 Minimize the use of the keyword 'null' in assignment statements

45.4 Minimize the use of the new Type[int] syntax for creating arrays of objects

45.5 Check all references obtained from 'untrusted' methods

45.6 For each loop trap

45.7 External tools