travishaberman
asked on
Do I need to import a class if it is in the project of the class I need it for?
I have 3 files in my project.
1) main.java
2) Morg.java
3) Pod.java
I need the Pod.java file to use some of the functionality of the Morg.java file. Do I need to import it? I have tried to import it but I am not sure of the proper syntax to use. And I my Pod file does not seem to acknowledge that the functionality of the Morg.java file.
Thank you Experts,
-TH
1) main.java
2) Morg.java
3) Pod.java
I need the Pod.java file to use some of the functionality of the Morg.java file. Do I need to import it? I have tried to import it but I am not sure of the proper syntax to use. And I my Pod file does not seem to acknowledge that the functionality of the Morg.java file.
Thank you Experts,
-TH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A split seems fair enough. I would however, for future users, like to point out that with my comment about accessing a method like so:
Morg.method();
The method() must also be static! (And in many cases, have an Access Control level of "public").
Morg.method();
The method() must also be static! (And in many cases, have an Access Control level of "public").
ASKER
-TH