![]() |
|
#1
|
|||
|
|||
Passing an object as a reference. What is wrong?All books state that an object is passed to a function as a reference. This is a simplest program:
JAVA Code:
Test_A Test_A IMHO, passing by the reference, must produce Test_A Test_1 What do I miss? Thank you |
|
#2
|
||||
|
||||
Re: Passing an object as a reference. What is wrong?Java manipulates objects 'by reference,' but it passes object references to methods 'by value.' -- David Flanagan, O'Reilly's "Java in a Nutshell"
see an example of the difference here: http://www.javaworld.com/javaworld/j...0526-pass.html __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing an object as argument to a function? | Ahas | CPP / C++ Forum | 2 | 25-Jul-2006 09:11 |
| How do I reference an undeclared object ? | Fermat | CPP / C++ Forum | 8 | 26-Apr-2006 22:54 |
| G++ question... | TreyAU21 | CPP / C++ Forum | 10 | 24-Feb-2006 08:45 |
| How to interpret characters as they are being entered? | nkhambal | C Programming Language | 18 | 14-Feb-2006 10:41 |
| [Tutorial] Pointers in C (Part II) | Stack Overflow | C Programming Language | 0 | 27-Apr-2005 17:36 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The