473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to call method in another file?

1
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
1 3793
JosAH
11,448 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

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

Similar topics

2
by: Titus Cheung | last post by:
Hello, I want to write some code such that it'll update (ie insert, delete, etc) some data to/from a mySQL database whenever a user hit an HTML form button (ie Submit). Now what I find annoying...
2
by: Ian | last post by:
I have written this utility class that has a method which calls another method. I don't want to pass in the self parameter and was wondering by doing this does it make the function to be private...
0
by: ding feng | last post by:
I have got formatted files. All of these file takes this form: obj1 method1 obj2 string1 obj3 string2 argument. Of course, each file can have maximum fields as shown above, or minimun fields...
1
by: bjam | last post by:
Hi, if I want to include a set of call template methods into my xsl file can I do that? Meaning I want to have the template method below of data_output in another file that I can use in several...
1
by: wierus | last post by:
Hello, i have a problem. I write my first class in python so i'm not a experience user. I want to call a function in another function, i tried to do it in many ways, but i always failed:( I...
1
by: Tom | last post by:
Hi, I have an aspx file and it's cs file. I have another class cs file which execute stored procedure. In the class cs file, there are static methods. But, the button event method in...
5
by: SStory | last post by:
Hi all, I really needed to get the icons associated with each file that I want to show in a listview. I used the follow modified code sniplets found on the internet. I have left in...
3
by: paolo.dx | last post by:
Hello, I have to call a member funtion "myclass.myfunc()" from another function "void method();" but I don't know the name of "myclass" and "myfunc()" because I'm writing a library.h that has to be...
1
by: Mike | last post by:
I have an web page (page1.aspx) that has a method in the code behind that I want to call from another page. Is this possible to do? The method resides in the page1.aspx.cs file, its a public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.