467,077 Members | 1,022 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

how to call method in another file?

hello everyone, i may need urs help.

i am facing problem now. i am using java applets. then, i have a method with a very long coding..So, i just open a new class. now, how do i call the method if in another file?

can anyone help me please?Thanks .. u all ..can send the solution to <posting email is gainst site rules: removed by Admin >
May 9 '07 #1
  • viewed: 3344
Share:
1 Reply
Expert 8TB
hello everyone, i may need urs help.

i am facing problem now. i am using java applets. then, i have a method with a very long coding..So, i just open a new class. now, how do i call the method if in another file?
It depends: normally you create an object (instantiation) of that other class.
Next you can invoke all its public methods (or package methods if the class
is in the same package as the calling class).

Maybe the class offers static methods too, I can't tell without seeing the API
docs or source code. btw, you don't "open" a new class nor does one call
methods in "another file". It's all classes inside the JVM.

kind regards,

Jos
May 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Titus Cheung | last post: by
1 post views Thread by wierus | last post: by
1 post views Thread by Tom | last post: by
3 posts views Thread by paolo.dx@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.