Java Programming/Exceptions/NullPointerException

From Wikibooks, open books for an open world
< Java Programming | Exceptions
Jump to: navigation, search

NullPointerException Null Pointer Exception: This is an exception that is thrown when a command tries to access a variable and use it while it is null when it cannot be used as such. Suggestion: try to find where the variable is supposed to be defined or define it in a try:catch:final block.

See also: Java Programming/Preventing NullPointerException

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export