| Author |
calling method from another package
|
dale con
Ranch Hand
Joined: Apr 15, 2005
Posts: 93
|
|
Hello I have a package com.mypackage which has some methods I have another package com.anotherapckage and i want to use a mehod in com.mypackage. How do i do this? I've imported the package import com.mypackage then MyClass myclass = new MyClass();, but non of the methods are exposed Many thanks
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
I need some more information in order to help you. What compiler errors do you get? Also, please post the code for MyClass and the class that is trying to use methods from it. Layne
|
Java API Documentation
The Java Tutorial
|
 |
dale con
Ranch Hand
Joined: Apr 15, 2005
Posts: 93
|
|
It's OK sorted it. Needed to make the method static Cheers
|
 |
 |
|
|
subject: calling method from another package
|
|
|