Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • paul wheaton
  • Paul Clapham
Saloon Keepers:
  • Piet Souris
Bartenders:
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
The only visible pointer in what's officially a language without pointers, the NullPointerException can lead to much frustration.

NullPointerException is similar to a core dump in C++. It basically refers to a situation where the program expected some object to be present but could not find it.

In other words, the calling object expects the called object to be there, but is suddenly surprised to find that the called object has ditched the calling object and has vanished!

This normally happens due to bad programming/design/programmer's carelessness. Typically beginners (even experienced ones for that matter) tend to make this mistake by not initializing objects properly or not taking care of objects properly, mostly because of the liberty GarbageCollection gives them, thereby giving Java a bad name.

- SathyaSrinivasan (9 Nov 2004).



It should be noted that Java _does_ have pointers. It just doesn't have PointerArithmetic like C and C++. An object reference are essentially pointers to objects. (I should probably find some sources to site for these claims. I'll add them later when I get a chance.)

- LayneLund (12 February 2004)

 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic