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 Insert method.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Insert method...." Watch "Insert method...." New topic

Insert method....

billy ghot

Joined: Nov 22, 2005
Posts: 7
this is my method...

ok, in the main application, when i do...

the compiler says it cannot find Insert.

please help..
thanks justin billy ghot
jiju ka
Ranch Hand

Joined: Oct 12, 2004
Posts: 306
java is case sensitive.

You need to call insert not Insert.

Your class name is Insert while method name is insert.

If you are calling insert from main method (or any method) of Insert class(or subclass), you can just say insert(A, 25)

If you are calling from any other class you need to specify Insert.insert(A, 25)
billy ghot

Joined: Nov 22, 2005
Posts: 7
i do put insert, not Insert, that was my bad....and it still says it cannont find symbol insert...
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Where is your main method? If it's in the same class it ought to compile. If not, you'll need to put the classname Insert.insert(...)

When I put main() in the same class, I got an index out of bounds a little later. I'll let you figure that one out.

Here's the main I added:

[ November 22, 2005: Message edited by: Stan James ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Insert method....
It's not a secret anymore!