class A{
public void doSomething(){...}
class B{
public void doSomething(){...}
public void somethingElse(){
//how do I call A's do something here?
}
}
}
Thanks for the help :)
Printable View
class A{
public void doSomething(){...}
class B{
public void doSomething(){...}
public void somethingElse(){
//how do I call A's do something here?
}
}
}
Thanks for the help :)
Not very good design to name your methods that way, but try
"A.doSomething()".
PC2
"Luchador" <rcruz@cs.utexas.edu> wrote in message
news:3b5a49e2$1@news.devx.com...
>
> class A{
> public void doSomething(){...}
> class B{
> public void doSomething(){...}
> public void somethingElse(){
> file://how do I call A's do something here?
> }
> }
> }
>
> Thanks for the help :)
Why is this not good design? Actually the real problem is both the enclosing
class and inner class inherit from Component. I want to use one of its(Component's)
methods for the enclosing class. Your suggestion gives an error since the
method is not static.
"Paul Clapham" <pclapham@core-mark.com> wrote:
>Not very good design to name your methods that way, but try
>"A.doSomething()".
>
>PC2
>
>"Luchador" <rcruz@cs.utexas.edu> wrote in message
>news:3b5a49e2$1@news.devx.com...
>>
>> class A{
>> public void doSomething(){...}
>> class B{
>> public void doSomething(){...}
>> public void somethingElse(){
>> file://how do I call A's do something here?
>> }
>> }
>> }
>>
>> Thanks for the help :)
>
>
Okay, so try A.this.doSomething().
PC2
"Luchador" <rcruz@cs.utexas.edu> wrote in message
news:3b5b2adf$1@news.devx.com...
>
> Why is this not good design? Actually the real problem is both the
enclosing
> class and inner class inherit from Component. I want to use one of
its(Component's)
> methods for the enclosing class. Your suggestion gives an error since the
> method is not static.