Thursday, March 12, 2009

Does java support pointers (CoreJava)

Question :Does java support pointers? (CoreJava)
Answer :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
How can you write serious code without pointers? 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.

No comments: