Re: pass by reference
- From: Andreas Leitgeb <avl@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 04 Apr 2008 12:45:56 GMT
Lew <lew@xxxxxxxxxxxxx> wrote:
Andreas Leitgeb wrote:
Chase Preuninger <chasepreuninger@xxxxxxxxx> wrote:When I took a practice certification exam in Java, I was marked wrong for
All objects are "passed by reference" and all primitive types haveThe objects are indeed passed by reference.
their value copied.
saying that objects are passed by reference. The fact is that objects are not
passed at all - references are, and they are passed by value.
This indication of lingual hairsplitting perhaps explains, why I got
somewhat less than 100% for my SCJP (but still by far enough to pass).
Can't say for sure, since one is never told, which of the questions
were really answered wrongly.
Just as well one could say that nothing at all is passed (since methods
don't have arms or hands to pass things around), but only written to some
physical memory-location where it is then accessible to the called method...
and then we go on, that the jvm doesn't really "call" the method, because
the method doesn't have ears to hear any calling...(btw., "invoke" also has
an etymology that boils down to some form of akoustic communication.)
Really, this makes me sick.
.
- References:
- pass by reference
- From: angelochen960@xxxxxxxxx
- Re: pass by reference
- From: Chase Preuninger
- Re: pass by reference
- From: Andreas Leitgeb
- Re: pass by reference
- From: Lew
- pass by reference
- Prev by Date: Storing preprocessed data over executions
- Next by Date: Re: Content type of image
- Previous by thread: Re: pass by reference
- Next by thread: Re: pass by reference
- Index(es):
Relevant Pages
|