aspose file tools*
The moose likes Beginning Java and the fly likes Need Help with methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need Help with methods " Watch "Need Help with methods " New topic
Author

Need Help with methods

Jere Johnson
Greenhorn

Joined: Mar 29, 2003
Posts: 28
Im getting an error when i call methods i created
in another java file. How do i get this file to
associate with the other java file that i created
my methods in? thanks for your help. Here is code

[ October 28, 2003: Message edited by: Jere Johnson ]
[ October 28, 2003: Message edited by: Jere Johnson ]

Diapers are the best invention
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

What does "/*public" match up with?
Please post errors.
Normally if you have the other class in the same directory and compile all the files in that directory - java is able to find methods in other classes. (Assuming that the methods are "public" and stuff like that.)


Please ignore post, I have no idea what I am talking about.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Jere
You don't have an object associated with the method being called so the ompiler is looking for the isCurrent method in the class it is called from. If the isCurrent method is defined in another class you need an instance of that class to call it on. Like this:
otherClassInstance.isCurrent()
hope that helps


Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help with methods
 
Similar Threads
need help with java
ignore this post
Need Help with a program
Scope and classes/methods
AddAfter method