The Java no pointer big fat lie!

A

axter

Whenever I read a Java book and it states that Java has no pointers, it
makes my teeth grind. It would be more accurate to say Java only uses
pointers.

That's right. Java only uses pointers.
However, that also wouldn't be entirely accurate either, but it would
be closer to the truth then to say Java doesn't use pointers.

When these books make these claims they're usually explicitly or
implicitly comparing the Java memory addressing method to the C/C++
memory addressing methods.

C++ has three main methods for addressing memory. (concrete, pointer,
and reference)
Concrete address
int x = 10;// x is a concrete variable

Pointer address
int *px = &x; //px is a pointer variable

Reference address
int &rx=x; //rx is a reference variable

Most Java books would have you believe that Java's memory method is
not a pointer method, and that it's memory methods are more like the
C/C++ concrete method.
However, if the characteristics of all three methods are examine,
you'll find that Java's memory method characteristics has more in
common with the C++ pointers, and have very little in common with the
concrete method.

In C++, when a concrete variable is declared, its constructor is always
called
When a reference variable is declared, a constructor is never called.
When a pointer variable is declared a constructor is called only if it
is initialized by pointing to a NEW-operator.
In this characteristic, Java address modal matches only the pointer
modal.

In C++, a concrete variable must be initialized to address valid
memory.
A reference variable must also be initialized to address valid memory.
A pointer may be initialized to point to nothing at all, or to point to
valid memory.
In this characteristic, Java address modal matches only the pointer
modal.

In C++, a concrete variable (once initialized) can never change the
memory it's addressing.
A reference variable (once initialized) can never change the memory
it's addressing.
A pointer can change what it's pointing to at any time.
In this characteristic, Java address modal matches only the pointer
modal.

In C++, you cannot assign a concrete variable to new operator.
A reference variable cannot be directly assigned to a new operator.
A pointer can be directly assigned to a new operator.
In this characteristic, Java address modal matches only the pointer
modal.

In C++, pointer arithmetic cannot be performed on a concrete type.
Pointer arithmetic cannot be performed on a reference type.
Pointer arithmetic can of course be performed on a pointer variable.
This is where Java memory modal and C++ pointers differ. You cannot
perform pointer arithmetic on a Java address method.

Other then pointer arithmetic, Java's memory modal is very much a C++
pointer memory modal.

So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."

OK, frag away!
 
C

Chris Smith

axter said:
Whenever I read a Java book and it states that Java has no pointers, it
makes my teeth grind. It would be more accurate to say Java only uses
pointers.

That's right. Java only uses pointers.

Yes, you're right. You're unlikely to find anyone on this newsgroup who
will disagree with you. However,
C++ has three main methods for addressing memory. (concrete, pointer,
and reference)
Concrete address
int x = 10;// x is a concrete variable

Pointer address
int *px = &x; //px is a pointer variable

Reference address
int &rx=x; //rx is a reference variable

Most Java books would have you believe that Java's memory method is
not a pointer method, and that it's memory methods are more like the
C/C++ concrete method.

I don't believe that's the case. Rather, these books are apparently
trying to co-opt the word "pointer" to refer to a specific set of
operations that can be applied to pointers in Java; namely, what's known
as "pointer arithmetic". The ability to do pointer arithmetic is gone
in Java, and it's worthwhile to point that out.

Unfortunately, these books choose a very poor way to make their point.
It would be more accurate to simply say that pointer arithmetic is not
possible, and to acknowledge that the word "pointer" can be validly
applied to Java's references. The Java Language Specification does
this, explaining that a reference value is either (a) a pointer, or (b)
null; thus defining the correct usage of these terms in the context of
Java. That the books don't follow suit is their loss.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
R

Rene

axter said:
Whenever I read a Java book and it states that Java has no pointers, it
makes my teeth grind. It would be more accurate to say Java only uses
pointers.

Java calls them references. They have the same job as a pointer but you
can't do pointer arithmetic, ie pointer+20 is impossible in Java.

Also I believe the references do not point directly to the memory location
of the object they reference but to an intermediate which does that. I
would need to read and confirm that myself though.
That's right. Java only uses pointers.

No references. A pointer is a memory address in C, no more, no less. That's
not what a reference in Java is.
However, that also wouldn't be entirely accurate either, but it would
be closer to the truth then to say Java doesn't use pointers.

If you want to see it that way: ok.

You could also say that references are a special kind of pointers. They are
certainly more specialized and limited.

[lines snipped]
In C++, when a concrete variable is declared, its constructor is always
called
When a reference variable is declared, a constructor is never called.
When a pointer variable is declared a constructor is called only if it
is initialized by pointing to a NEW-operator.
In this characteristic, Java address modal matches only the pointer
modal.

static initialization ?
In C++, a concrete variable must be initialized to address valid
memory.
A reference variable must also be initialized to address valid memory.
A pointer may be initialized to point to nothing at all, or to point to
valid memory.
In this characteristic, Java address modal matches only the pointer
modal.

A java object reference must be initialized to address valid objects. I'm
using your words to show that this sentence can be constructed so one can
could say that the Java address model matches the reference model of C++.
(When only looking at this aspect)
In C++, a concrete variable (once initialized) can never change the
memory it's addressing.

This is wrong. The compiler and language give you no tools to do that but
you can do it as you wish. You have full control over the contents in
memory, includign the stack frame. You can change it as you wish. Nobody is
protecting you to shoot yourself in the foot.
A reference variable (once initialized) can never change the memory
it's addressing.
A pointer can change what it's pointing to at any time.
In this characteristic, Java address modal matches only the pointer
modal.

Not in Java. You can only point to valid objects of a valid type (or
subtype) or NULL. It's not a pointer, its a reference. A pointer is a
number which is a memory location. Not so in Java. Thus it makes sense to
not call it a pointer but look at it if it were one, if that helps you
working with java.
In C++, you cannot assign a concrete variable to new operator.
A reference variable cannot be directly assigned to a new operator.
A pointer can be directly assigned to a new operator.
In this characteristic, Java address modal matches only the pointer
modal.

Well Instantiation is not assigning an operator to a reference in Java.
There are very few operators in Java and there's no user-defineable
operator overloading either. "new" instantiates and returns a reference
which you can then assign.
In C++, pointer arithmetic cannot be performed on a concrete type.

You can. Nobody prevents you from doing it. Sure it's a hack, but you can.
Pointer arithmetic cannot be performed on a reference type.

You can just as well. Just look to see what your reference type is in
memory and where it gets stored (stack frame) and mess around, swap it
against another, etc.
Pointer arithmetic can of course be performed on a pointer variable.
This is where Java memory modal and C++ pointers differ. You cannot
perform pointer arithmetic on a Java address method.

Yes, and that's a damn wise decision to make it so.
Other then pointer arithmetic, Java's memory modal is very much a C++
pointer memory modal.

Nope, I disagree. It has similar components. But it's not the same thing
and that's why they are called references in Java and not pointers, so as
to not cause confusions. References are "weaker" in the sense that you can
do less things with 'em than with pointers. But the concept is far more
powerful. It enables things that are simply not possible otherwise. I find
it always amazing what just one level of indirection can gain you (often at
the cost of complexity though)
So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."

No there's more to it, at least in my opinion. Yes, references and pointers
are somewhat similar. It is not the same thing though.
OK, frag away!

ka-lack :)

CU

René
 
M

marcus

It was a wise observation that behavior combined with language syntax
was generating problematic code by the SAN-ful. Pointer arithmetic in
and of itself is not evil -- but the behavior it spawned has been the
bane of maintenance coders for decades. The solution was two-fold:
remove the syntax *and* change the manner in which the language is
described. The choice was made to explicitly remove the word "pointer"
from any description of the language, to further remove the associated
behavioral problems.

You can play symantic games if you like, but c code compiles to actual
addresses and incrementing a c pointer adds an integer that corresponds
to the actual size in memory of the item referenced. There is
absolutely nothing like that in Java.
 
B

bugbear

axter said:
So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."

Agreed. What you say is not important, but it is
accurate.

It's also meaningless to someone who doesn't already
know what "pointers" are, so it's not a useful
statement in a text on Java aimed at beginners.

BugBear
 
B

bugbear

Rene said:
Also I believe the references do not point directly to the memory location
of the object they reference but to an intermediate which does that. I
would need to read and confirm that myself though.

It may or may not be. As far as I understand it, this would be
down the JVM implementation.

As long as references are dereferencable, we're good to go.

BugBear
 
T

Tilman Bohn

Whenever I read a Java book and it states that Java has no pointers, it
makes my teeth grind. It would be more accurate to say Java only uses
pointers.

That's right. Java only uses pointers.

Don't you think that's rather a pompous way to state something that's
likely to be obvious to almost everyone present? ;-)

[...]
So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."
[...]

Funny, all Java books on my bookshelf that concern themselves with the
issue at all state it this way, or at any rate close to it. Maybe you
should consider staying away from those `Dummy' type books, but that
might be prejudice on my part (with respect to you or those books, or
both).
 
V

Vincent Cantin

Whenever I read a Java book and it states that Java has no pointers, it
makes my teeth grind. It would be more accurate to say Java only uses
pointers.

Yes, and what ?
Did you need to write 3 pages about this ? :p
 
A

axter

Whenever I read a Java book and it states that Java has no
pointers, itMy comments are referring to C++ comparison and not C. Since C doesn't
have
reference types, it wouldn't be a good comparison.
In C++, a reference can not change what it's pointing to. That's not
what a
reference is in Java is.
In C++, you can not assign a new operator to a reference. That's not
what a
reference is in Java is.

No, a Java object can be initialize to point to NULL.
You can not do that with a C++ concrete object or a C++ reference.


My statement is correct with reference to the C++ language. I'm not
talking
about hacking into the memory. That would be like me saying that Java
has pointer arithmetic via JNI. That's out side of the scope of the
language,
and out side of the scope of this topic.


That's not correct. The Java language specification states that a
reference is either a pointer or a null.
can.

This is also incorrect. The C++ compiler is preventing you from doing
it.

This is again outside of the scope of the language, and the same can be

said for Java if someone wanted to hack it.
Both are outside of the scope of the language standard, and outside
of the scope of this topic.

As I previously stated, they're not exactly the same, but it has more
in
common with pointers then it does with C++ reference or C++ concrete
types.

IMHO, the only reason they call it a reference in Java, is to not to
scare
away any newbie's to the language.
"A pointer by any other name is still a pointer."

You're right. They're not the same. And that's why I'm saying
Java is using pointers, and not reference types.
They may call it a reference, but when compared to C++ reference and
C++ pointer types, Java variables are closer to a C++ pointer, with the
one exception of it lacking pointer arithmetic.
 
A

axter

So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."


[...]

Funny, all Java books on my bookshelf that concern themselves with the
issue at all state it this way, or at any rate close to it. Maybe you
should consider staying away from those `Dummy' type books, but that
might be prejudice on my part (with respect to you or those books, or
both).

Please tell me specifically which Java books are on your bookshelf that
states this and the page.

Maybe you're right, and I have the wrong Java books. So please
enlighten me with a list of the right Java books that defines this
topic correctly.
 
C

Chris Smith

axter said:
You're right. They're not the same. And that's why I'm saying
Java is using pointers, and not reference types.
They may call it a reference, but when compared to C++ reference and
C++ pointer types, Java variables are closer to a C++ pointer, with the
one exception of it lacking pointer arithmetic.

You'll find just as many problems cross-applying the term "reference"
from C++ as you do cross-applying the term "pointer" from C or C++. In
either case, the set of available operations on those types in C++ or C
is a very poor standard for their definition.

So yes, it is impossible to change the referent of a C++ reference once
it's been created. Yes, it's impossible to create a reference without a
referent. However, that doesn't mean it's inappropriate to use the term
"reference" in the Java programming language for something that doesn't
carry that restriction. That restriction is no more intrinsic than any
other C++ language detail, and you may as well claim that references
have to use the '&' character in their type declarations.

Basically, in the end, these terms are language-dependent in their
meaning. So long as the concepts involved have to do with indirect
access to data, it just looks silly to rant about subtleties of their
"misuse" by some specific language.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
T

Tilman Bohn

[...]
Please tell me specifically which Java books are on your bookshelf that
states this and the page.

Obviously you think you're calling a bluff here. You're not.

I certainly won't go through most of them now just to find the
relevant passages, so I'll just give a few introductory ones where I
could find it promptly. To begin with, _Just Java_ by Peter van der
Linden, 3rd ed. (1998), p.40. Sorry, don't have a newer edition of that,
but I have no reason to think he might have changed that in a later
edition. In the box `References, Pointers, Addresses, and Null' the
first paragraph reads:

`You might have heard "Java doesn't have any pointers." Actually,
the truth is almost the opposite: all objects in Java are
accessed through pointers all the time. However, Java doesn't
have arbitrary arithmetic on pointers [...] and Java
automatically dereferences pointers as needed.'

I was originally going to leave it at that, but here's _The Java
Tutorial_ by Campione and Walrath (1996). Again, I don't have a newer
edition handy, but you can check Sun's site for it i think. Anyway,
p.48, in a `Note to C and C++ Programmers:'

`Pointers

Some data types in Java, such as objects and arrays, are
reference data types. The value of a variable whose data type is
a reference type is a reference (_or a pointer_ in other
terminology) to the actual data. However, Java does not have an
explicit pointer _type_. You cannot construct a reference to
anonymous memory.' [Emphasis mine.]

Almost the exact same statement is repeated in the main text on p.80.
And this isn't even a particularly good book... I'd actually rate that
on the level of those `Teach yourself XY in 21 days' books.

I'm pretty sure there is a similar passage (actually, probably
several, sprinkled all over the book) in _Java in a Nutshell_ by
Flanagan, but I can't find it now. Wait, here's one. p.85 of the 4th
ed. (2002), admittedly under the heading `No Pointers', but read on:

`Java classes and arrays are reference types, and references to
objects and arrays are akin to pointers in C. Unlike C pointers,
however, references in Java are entirely opaque. There is no way
to convert a reference to a primitive type, and a reference
cannot be incremented or decremented.'

I checked the second edition from 1997 real quick, and it has similar
language starting on p.25. The fourth edition is clearer though, IMO.

Ok what the hell, let's do one more and then I'll have to hit the
hay. _Java Virtual Machine_ by Meyer and Downing (1997) (`Diskette
included,' LOL!), p.49:

`If you are familiar with C or C++, you can mentally replace the
term "reference" with the term "pointer," and you will get the
right idea.

[...]

`Unlike C and C++, Java provides no equivalent of pointer arithmetic
operations -- a reference is an opaque type and cannot be treated
as a number, or cast into a numeric type, or used to modify an
arbitrary location in memory.'

That's four cites. Enough for tonight? (I can't believe I've wasted
so much time on a troll.)
Maybe you're right, and I have the wrong Java books. So please
enlighten me with a list of the right Java books that defines this
topic correctly.

Perhaps you can instead cite some books yourself that make the kind of
unqualified statement that _you_ claimed `all' of them did.
 
R

Rene

axter said:
My comments are referring to C++ comparison and not C. Since C doesn't
have
reference types, it wouldn't be a good comparison.

If you wish, that does not make a difference in my book. Ok, I know C far
better than C++. Or more specifically, my C++ knowledge is weak. But as in
C you can manipulate any arbitrary memory location at your bidding in C++
so my main argument still holds.

As an aside, by memory model I mentally include what you can do in memory
and what you can't - and there is a big difference in Java to C and C++.
This may not be exactly the definition of memory model (what is the exact
definition of memory model of a language by the way?), but I find it
captures the essence better - at least for me.
In C++, a reference can not change what it's pointing to. That's not
what a
reference is in Java is.

You cannot change it in the language itself, because the language does not
allow it. You can change it in memory however - because the language allows
arbitrary and full control over memory. Not so in Java. You can NOT change
a reference in Java to point to a "wrong" object. NULL is special and is
allowed, but not wrong types. And there is no workaround to that. When you
use JNI you use an interface to another language. That's no longer Java,
it's C (or C++) that may mess with memory but not Java.
In C++, you can not assign a new operator to a reference. That's not
what a
reference is in Java is.

Sorry I don't understand that sentence. You can never assign an operator to
any reference in Java. Operators are not assignable.
No, a Java object can be initialize to point to NULL.

No, that is then not an initialized object.
You can not do that with a C++ concrete object or a C++ reference.

You can. You have full control over the whole memory space. The language
does not prevent you from doing it, though it does not give you the tools
to do it trivially easy either.
My statement is correct with reference to the C++ language. I'm not
talking
about hacking into the memory. That would be like me saying that Java
has pointer arithmetic via JNI. That's out side of the scope of the
language,
and out side of the scope of this topic.

No, JNI is only the interface. JNI has not the power to do it either. The
language invoked via JNI (usually C or C++) can do it. Java can't.

And it was my understanding that this might be the most important point in
the whole discussion (and thus very well in the scope of the topic). You
just cannot do it in Java. Java not only gives you no tools to manipulate
the memory at your will easily, it has NO mechanism at all to allow this
kind of thing.

Thus I would distinguish pointers (of C and C++ and other languages) from
references in Java (and again from reference types in C++). What you can do
with them and what they are used for is just too different to make the
distinction worthwhile.

As I've said, if you want to call Java's references pointers, that's ok.
But there's more difference than just Java prohibiting arithmetic on them.
That's not correct. The Java language specification states that a
reference is either a pointer or a null.

Null in Java is not a number but a special reference type (castable to any
other type). And this makes null just another valid object-type.

Pointers in C are just a number specifiying the *exact* memory address in
the virtual address space of a process. This may be so in one Java VM but
may be comepletely different in another Java VM, enabling the latter to
completly reorder the memory layout of objects in order to reduce memory
fragmentation. Such a thing is impossible in C and C++ because of their use
of pointers which are not controllable by the language.

[snipped some lines]
can.

This is also incorrect. The C++ compiler is preventing you from doing
it.

int i;
void * pi = &i;

now search the stack frames and data segment for the value in pi.
Manipulate. Done.

Try to do the same in Java. Impossible. JNI can't do it either. C can. C++
can.
This is again outside of the scope of the language, and the same can be

said for Java if someone wanted to hack it.
Both are outside of the scope of the language standard, and outside
of the scope of this topic.

No it cannot be done in Java. But if you perceive this as outside of the
scope of the topic, then that's your call. I was pointing out that I
include such thoughts into the memory model of a language. There are
obviouse large differences which, as I argued, makes it useful to
distinguish between pointers and references.

You were right from the start that Java does have something like pointers.
Nobody disagreed with you on that point. Not me, not anyone else. I just
tried to explain the rationale of doing so from my point of view.

[snipped some more]
As I previously stated, they're not exactly the same, but it has more
in
common with pointers then it does with C++ reference or C++ concrete
types.

IMHO, the only reason they call it a reference in Java, is to not to
scare
away any newbie's to the language.
"A pointer by any other name is still a pointer."


You're right. They're not the same. And that's why I'm saying
Java is using pointers, and not reference types.
They may call it a reference, but when compared to C++ reference and
C++ pointer types, Java variables are closer to a C++ pointer, with the
one exception of it lacking pointer arithmetic.

As has been pointed out, why do you insist that Java has no references
since it is something different than the reference type in C++ but then you
reverse the argument when it comes to pointers and state the contrary?

In the end, it's just a more or less arbitrarily named "thing". You could
write books over the difference of "integer" between many languages.

References in Java are Java's pointers. There are more differences than
just the lack of pointer arithmetric (or "reference arithmetric" if you
want). Call 'em so if you want. Be aware of the differences though. It
makes perfect sense to _me_ to not call them pointers.

CU

René
 
M

marcus

peter van der linden rocks. his books are insightful, and he haunts
this ng once in a while

Tilman said:
In message <[email protected]>,
axter wrote on 25 Feb 2005 15:23:47 -0800:

So if a Java book really wanted to be more accurate, it would say:
"Java only uses pointers, and Java pointers lack the ability to
perform pointer arithmetic."
[...]

Please tell me specifically which Java books are on your bookshelf that
states this and the page.


Obviously you think you're calling a bluff here. You're not.

I certainly won't go through most of them now just to find the
relevant passages, so I'll just give a few introductory ones where I
could find it promptly. To begin with, _Just Java_ by Peter van der
Linden, 3rd ed. (1998), p.40. Sorry, don't have a newer edition of that,
but I have no reason to think he might have changed that in a later
edition. In the box `References, Pointers, Addresses, and Null' the
first paragraph reads:

`You might have heard "Java doesn't have any pointers." Actually,
the truth is almost the opposite: all objects in Java are
accessed through pointers all the time. However, Java doesn't
have arbitrary arithmetic on pointers [...] and Java
automatically dereferences pointers as needed.'

I was originally going to leave it at that, but here's _The Java
Tutorial_ by Campione and Walrath (1996). Again, I don't have a newer
edition handy, but you can check Sun's site for it i think. Anyway,
p.48, in a `Note to C and C++ Programmers:'

`Pointers

Some data types in Java, such as objects and arrays, are
reference data types. The value of a variable whose data type is
a reference type is a reference (_or a pointer_ in other
terminology) to the actual data. However, Java does not have an
explicit pointer _type_. You cannot construct a reference to
anonymous memory.' [Emphasis mine.]

Almost the exact same statement is repeated in the main text on p.80.
And this isn't even a particularly good book... I'd actually rate that
on the level of those `Teach yourself XY in 21 days' books.

I'm pretty sure there is a similar passage (actually, probably
several, sprinkled all over the book) in _Java in a Nutshell_ by
Flanagan, but I can't find it now. Wait, here's one. p.85 of the 4th
ed. (2002), admittedly under the heading `No Pointers', but read on:

`Java classes and arrays are reference types, and references to
objects and arrays are akin to pointers in C. Unlike C pointers,
however, references in Java are entirely opaque. There is no way
to convert a reference to a primitive type, and a reference
cannot be incremented or decremented.'

I checked the second edition from 1997 real quick, and it has similar
language starting on p.25. The fourth edition is clearer though, IMO.

Ok what the hell, let's do one more and then I'll have to hit the
hay. _Java Virtual Machine_ by Meyer and Downing (1997) (`Diskette
included,' LOL!), p.49:

`If you are familiar with C or C++, you can mentally replace the
term "reference" with the term "pointer," and you will get the
right idea.

[...]

`Unlike C and C++, Java provides no equivalent of pointer arithmetic
operations -- a reference is an opaque type and cannot be treated
as a number, or cast into a numeric type, or used to modify an
arbitrary location in memory.'

That's four cites. Enough for tonight? (I can't believe I've wasted
so much time on a troll.)

Maybe you're right, and I have the wrong Java books. So please
enlighten me with a list of the right Java books that defines this
topic correctly.


Perhaps you can instead cite some books yourself that make the kind of
unqualified statement that _you_ claimed `all' of them did.
 
K

Kevin McMurtrie

So what's your point?

Does Java have auto variables that construct and destruct by scope? No.

Does it have inline/netsted object storage? No.

Are object references a native memory pointer or an abstracted
reference? Depends on the JVM.

It's a different language so comparing the finest details to C++ is
silly.
 
T

Thomas G. Marshall

marcus coughed up:
peter van der linden rocks. his books are insightful, and he haunts
this ng once in a while


I think he is one of the best authors for teaching java I've ever come
across. Actually, I am kind of jealous of how well written his books are.
Guys like that piss me off :) I used to use Just Java when I was contracted
to teach java to companies needing to cross the boundary from some other OO
discipline. And even the seasoned OO folks loved it.

And then I was stuck trying to teach a company java and discovered at my
first class that only 1/3 of the class had any OO experience at all! And
they were fairly senior OO guys. OI. And the newcomers to OO loved it as
well.

I regard it as basically a Harry Potter phenomenon in its appeal. There.
Perhaps I've drooled too much on my keyboard this time....


--
Iamamanofconstantsorrow,I'veseentroubleallmydays.Ibidfarewelltoold
Kentucky,TheplacewhereIwasbornandraised.ForsixlongyearsI'vebeenin
trouble,NopleasureshereonearthIfound.ForinthisworldI'mboundtoramble,
Ihavenofriendstohelpmenow....MaybeyourfriendsthinkI'mjustastrangerMyface,
you'llneverseenomore.ButthereisonepromisethatisgivenI'llmeetyouonGod's
goldenshore.
 
T

Thomas G. Marshall

Kevin McMurtrie coughed up:
So what's your point?

Does Java have auto variables that construct and destruct by scope?
No.

Does it have inline/netsted object storage? No.

Are object references a native memory pointer or an abstracted
reference? Depends on the JVM.

It's a different language so comparing the finest details to C++ is
silly.


I'm afraid I've missed *your* point here.

He understands full well that there are multiple differences in the
pointers. He's merely trying to pull together the parts of the term
"pointer" from another language that fits what happens in Java.


--
Iamamanofconstantsorrow,I'veseentroubleallmydays.Ibidfarewelltoold
Kentucky,TheplacewhereIwasbornandraised.ForsixlongyearsI'vebeenin
trouble,NopleasureshereonearthIfound.ForinthisworldI'mboundtoramble,
Ihavenofriendstohelpmenow....MaybeyourfriendsthinkI'mjustastrangerMyface,
you'llneverseenomore.ButthereisonepromisethatisgivenI'llmeetyouonGod's
goldenshore.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top