A short, to-the-point, document summarizing a topic (i.e. programming language)

learn more… | top users | synonyms

52
votes
3answers
20k views

How is a Java reference different from a C pointer?

C has pointers and Java has what is called references. They have some things in common in the sense that they all point to something. I know that pointers in C store the addresses they point to. Do ...
22
votes
4answers
3k views

Why do C++ and Java both use the notion of “reference” but not in the same sense?

In C++ a reference argument to a function allows the function to make the reference refer to something else: int replacement = 23; void changeNumberReference(int& reference) { reference = ...