aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Are there pointers in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Are there pointers in Java?" Watch "Are there pointers in Java?" New topic
Author

Are there pointers in Java?

parul choudhary
Greenhorn

Joined: Nov 23, 2000
Posts: 9
Just like pointers are there in C, is there any substitute for them in Java?
Udayan Naik
Ranch Hand

Joined: Oct 18, 2000
Posts: 135
Yes Parul,the pointers are called REFERENCES in Java.
------------------
Come on in !! Drinks are on the house in the Big Moose Saloon !!


Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform
asim wagan
Ranch Hand

Joined: Nov 14, 2000
Posts: 62
Yes it is true that refernces are a type of pointers but you can not manipulate them just lie C pointers. so be careful about that. Here is a quote from JLS sec:4.3.1
"The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object."
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Are there pointers in Java?