| Author |
A simple(!) "Call by Value "Example
|
Steve Jensen
Ranch Hand
Joined: Sep 23, 2002
Posts: 126
|
|
Hiya folks. OK, now i understand conceptually, what passing an argument by the "Call by Value" principle is. But i've been looking at a small program from a book, which is meant to illustrate it. The code is below:- I sort of understand how this program works, but i am well and truly stumped as to what the line...... ......is doing. What on earth is 'meth', i.e., this hasn't been declared anywhere else in the code! Why is this so? Any help would be greatly appreciated. Cheers in advance Steve
|
John Bonham was stronger, but Keith Moon was faster.
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8259
|
|
ob is an instance of class Test. Find where Test is declared and you should find a method named meth.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
|
posted

0
|
You're missing the class Test (meth must be a method of this class) If I'm reading what it's supposed to depict correctly, here's what would go with it (and a bit extra, to see the difference)
|
 |
 |
|
|
subject: A simple(!) "Call by Value "Example
|
|
|