aspose file tools*
The moose likes Beginning Java and the fly likes JAVA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JAVA "pointer "?" Watch "JAVA "pointer "?" New topic
Author

JAVA "pointer "?

Frank Zheng
Ranch Hand

Joined: Jun 12, 2001
Posts: 76
Bruce Eckel has a good aticle about comparing C++ and java in his book("Think in Java"). However, when he talk about the pointer, his word is really ambique. Can anybody give any insight about the "Pointer" issue in Java.
" The Java promoter initially said "No Pointer", ...then they say " Restricted Pointer".
Thanks,
Frank


Sun Certified Java Programmer
Deepak Mahbubani
Ranch Hand

Joined: May 12, 2001
Posts: 68
Originally posted by Frank Zheng:
Bruce Eckel has a good aticle about comparing C++ and java in his book("Think in Java"). However, when he talk about the pointer, his word is really ambique. Can anybody give any insight about the "Pointer" issue in Java.
" The Java promoter initially said "No Pointer", ...then they say " Restricted Pointer".
Thanks,
Frank

Java DOES have pointers. In fact they are called references in the Java Language Specification.
"An object is a class instance or an array.
The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object." JSL - 4.3.1

The Java promoter initially said "No Pointer" because Java pointers are different from the conventional C , C++ pointers in the sense that they give restricted capabilities. For instance, u can't add, or subract to a pointer. THis is because memory management is done by the JVM itself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA "pointer "?