File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to Transfer and Store multiple values? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to Transfer and Store multiple values?" Watch "How to Transfer and Store multiple values?" New topic
Author

How to Transfer and Store multiple values?

Avin Sinanan
Ranch Hand

Joined: Nov 07, 2001
Posts: 109
Hello i am having problem doing the following.. consider the situation :
1)Ok lets assume i have 2 classes. Two Seperate classes.
2)Ok each class allows the user to input 2 string values. There each class produces a String value.
3)Now lets assume we have a 3rd Class. Now the purpose of this 3rd class is to compare the two String values from each class.
4)Hence the string value from each class must be sent to the 3rd class. And the 3rd class must store these values and then compare them. If the two String vales are the same the program prints " they are the same"
If they are diffrent the program prints "they are different".
5)I can already make classes 1 and 2. However i am having problems creating the 3rd class. how do i do this? Do i need to create a JList or a Matrix. I'ce tried both and well i have failed. Does anyone out there have any ideas? Please let me know.Any knod of help would be appreciated. Thanks.
Thanks Avin Sinanan

yours respectfully<br />Avin Sinanan
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Not sure if this is what you are wanting, but a simple solution would be to have a getString() method in your two classes, have your third class instantiate objects of those two classes, and call this method. Then use the equals() method from the String class to see if they are the same.
Jason
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Transfer and Store multiple values?