Thread: Imports
View Single Post
  #5 (permalink)  
Old 09-07-2008, 12:05 AM
Norm's Avatar
Norm Norm is offline
Senior Member
 
Join Date: Jun 2008
Location: SouthWest Missouri, USA
Posts: 2,229
Rep Power: 4
Norm is on a distinguished road
Default
If Amory is a class, create an instance of it using new and then you can call its methods:

Amory amry = new Amory();
int value = army.getValue(); // get value

Quote:
import MyGame.Amory
For the above import to find the class Amory, the class file would be in a folder MyGame and the classpath would end at the folder containing MyGame. Amory would be in the package: MyGame.
If none of this makes sense, go read about packages, classpath and import statement.
Reply With Quote