>I am not sure my question is valid or not. It is the following:
>public class MyClass {
> public void doA() {
> int num = 10;
> doB();
> //Now, num value has been changed
> }
> public void doB() {
> //I need to access and change the value num inside doA. But I don't
> //know how to do it.
> }
>}
This isn't possible. It's also very much against the grain of structured
programming - doB can not know that it's called only from within doA, so it
can't access locals that only exist in doA.
Find another way to design your class such that scope of data elements is
cleaner.
--
Mark Rafn
<http://www.dagon.net/>