Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are there pointers in Java?

 
parul choudhary
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like pointers are there in C, is there any substitute for them in Java?
 
Udayan Naik
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Parul,the pointers are called REFERENCES in Java.
------------------
Come on in !! Drinks are on the house in the Big Moose Saloon !!
 
asim wagan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic