This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to pass value from one file to anaother Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to pass value from one file to anaother" Watch "How to pass value from one file to anaother" New topic
Author

How to pass value from one file to anaother

Gaurav Ram
Ranch Hand

Joined: Feb 23, 2008
Posts: 32
Hi,

I am having 2 java files and i have to pass one value from first file to another.

Can you please suggest me the way i can achieve this.

Thanks,
Gaurav
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Hi,

Classes communicate by calling each other's methods. They exchange information by passing arguments to those methods. Make sense? Let us know if you need more of an explanation.


[Jess in Action][AskingGoodQuestions]
Gaurav Ram
Ranch Hand

Joined: Feb 23, 2008
Posts: 32
Sir, Thanks for your reply.

Its fruitful for me.
Dave DiRito
Ranch Hand

Joined: Feb 08, 2008
Posts: 77
This is just what I've been trying to understand. Can anyone point me to some good, basic examples of this?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343



"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Dave DiRito
Ranch Hand

Joined: Feb 08, 2008
Posts: 77
Marc,
Excellent example! Thank you again. I really appreciate your help.

Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass value from one file to anaother