pointer : Java Glossary
home P words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2007-09-29 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
pointer
Strictly speaking, in Java, a pointer is a reference that is guaranteed not to be null. However, when people use the term pointer, they usually mean C++ style direct hardware address pointers.

You may have heard some FUDster claiming that “Java sucks roadkill” because it has no pointers. He jeers, “How can you write serious code without pointers? In Java are you actually limited to FØRTRAN style problems: no linked lists, no queues etc?” Java does not have raw pointers like C or C++. It has something almost as powerful, but many times safer called references (Java refers to them as pointers in one place, the NullPointerException). They are like pointers, except that the dangerous features are removed, namely:

The safety comes with a cost. Here’s my take on what happened. Originally Java’s references were called pointers. However, the term pointer had a bad rap from what chaos happens when you allow pointer arithmetic, optional initialisation and manual object recycling.

So they decided to rename them references. But old habits die hard, and people, even those at Sun, sometimes continued to call them pointers. The further wanted a new term that allowed for the many ways you can implement Java pointers e.g. via machine virtual RAM pointers, segmented pointers, 64-bit addressing pointers or handles. The word pointer leaked through in various places including NullPointerException.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Spread the Net
You are visitor number 22,403.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/pointer.html J:\mindprod\jgloss\pointer.html