Re: Pointer vs Reference
- From: Lasse Reichstein Nielsen <lrn@xxxxxxxxxx>
- Date: Sun, 30 Sep 2007 02:03:04 +0200
Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx> writes:
In Java a final reference cannot be changed. An non-final reference
can.
If we are pedantic, then it would be more correct to say:
A final variable (of reference type or not) cannot be changed. A
non-final variable can. References themselves are atomic and immutable.
In Java, Objects are not first class values. A variable cannot hold
an object. What they can hold is a reference to an object.
/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors: <URL:
http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
.
Relevant Pages
- Newbie Question
... to make my own picture of the difference of value and reference types. ... This adress which points on the stack can ... If a new instance of a reference type is generated then the same ... is an adresse which points to the heap where the real data of the ... (microsoft.public.vb.general.discussion) - Newbie Question about Value and Reference Types
... to make my own picture of the difference of value and reference types. ... This adress which points on the stack can ... If a new instance of a reference type is generated then the same ... is an adresse which points to the heap where the real data of the ... (microsoft.public.dotnet.languages.vb) - Newbie Question about Value and Reference Types
... to make my own picture of the difference of value and reference types. ... This adress which points on the stack can ... If a new instance of a reference type is generated then the same ... is an adresse which points to the heap where the real data of the ... (microsoft.public.dotnet.general) - Re: Best Practices Questions - Sending objects to/from a class modules/functions, etc?
... >> class module? ... Passing a Reference Type ... > Passing a Reference Type by Val passes a reference to the object, ... I can dispose of the returned object when I'm ... (microsoft.public.dotnet.general) - Re: Boxing and Unboxing of Value-Types when passed to a method call
... 1)A reference type is a type which has as its value a reference to the ... 3)Saying that "value types go on the stack, reference types go on the heap" ... the variable that declares the value type. ... (microsoft.public.dotnet.languages.csharp) |
|