The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


invoke method from outside package

Posted by nada on November 12, 2001 at 3:59 PM

Hello every body ,
i have the follwoing code :

file conatin :

class a {
public void invokeUserMethod(){
System.out.println("i'm here ") ;
m.invoke(......) ;
}// a
file conatin :
class b {
void m() {
................ ; invokeUserMethod() ;.............
}//class b

the previous will work correctly .However , when i put class a in package then i import it in class b and from class b i call method invokeUserMethod then the problem araise and the result be at run time :

i'm here

is this mean that invoke method can't call method from outside package and is there is any solution for this problem .
please i need any body to tell me where is the problem
and what is the solution

Thanks a lot


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us