File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Insert 2nd class tu main class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Insert 2nd class tu main class" Watch "Insert 2nd class tu main class" New topic
Author

Insert 2nd class tu main class

nani aman
Ranch Hand

Joined: Sep 22, 2004
Posts: 33
Hi,

i have a bug in my mind,i think. I create a program in 2 class which have their own operation. the 1st class in the main class which i want to have the second class in the first class. How can i link the second class to the main class? In my second class i have a variable that i want to insert in main class. Can i send by click a button in second class, but how?

Please assist me.
Thank you.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Why not have the class with the main() method simply load the second class?

Seems to me from here "main" can do as it pleases, barring any little scoping restrictions you've put in the way so life can be harder for you.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
nani aman
Ranch Hand

Joined: Sep 22, 2004
Posts: 33
is there any include class file in the header like C++?
 
wood burning stoves
 
subject: Insert 2nd class tu main class
 
Similar Threads
can get label on second line
Using custom panel in NetBeans GUI builder
how to pass command line arguments
How do i set a value in a jsp and get the same value in a servlet?
Calling main method