File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes creating methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "creating methods" Watch "creating methods" New topic

creating methods

Mike Smith
Ranch Hand

Joined: Sep 23, 2005
Posts: 85
Hello all, I am trying to create methods that perform certain computations. Some of the methods have already been written for a previous assignment. However, I am to insert 2 of these methods into a class; and be able to invoke these methods from other classes I write. SO I have to edit the return type of each method; and edit the method to accomadate the class it will be in. When I write new classes, does my class file that contains these methods need to be placed in the same directory(folder) as the new class for which I am writting. I assume so. But for some odd reason I am getting an error while trying to invoke one of these methods in another class file. THis is what I have so far. Maybe someone could shed some light on what I am doing wrong. I would like to test each method in myUtils file class to make sure it returns what it is suppose to. SO I am creating little programs on the side to test it. Anyways, here is what I got.
This is my test class.

Furthermore, this is my class containing the methods I wish to invoke.
Henry Wong

Joined: Sep 28, 2004
Posts: 20531

It would help if you mention what the is exception that you are encountering.

However, at a quick glance, you are trying to call an isInteger() method of the String class -- which is not possible.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Mike Smith
Ranch Hand

Joined: Sep 23, 2005
Posts: 85
OOps, thanks for noticing. I will try to debug the problem. My question I guess wasn't clear. Thats okay, i'll keep you posted. thanks again.
I agree. Here's the link:
subject: creating methods
It's not a secret anymore!