| Author |
Why it shows error?
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Hi helpers, Considering the code below, So I thought i is local to public void amethod(Ref r), so I declared the variable i right before Ref ref = new Ref(); and even then Iam getting the same error? Can anyone help me on this? Regards, Jothi Shankar Kumar. S
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Rajesh Kadle
Greenhorn
Joined: Sep 06, 2004
Posts: 26
|
|
Yes, as you said i is local. We should make it class/instance variable to be visible. Please see the change below: [ October 16, 2006: Message edited by: Rajesh Kadle ]
|
-Raj
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Hi Rajesh, Even after making i as an instance variable, I'm getting the same error. Regards, Jothi Shankar Kumar. S
|
 |
Rajesh Kadle
Greenhorn
Joined: Sep 06, 2004
Posts: 26
|
|
you should use 'r' instead of 'ref'. Error is on this variable: Change the above code to:
|
 |
 |
|
|
subject: Why it shows error?
|
|
|