The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


how to Transfer and Store two Values ?

Posted by Avin Sinanan on November 27, 2001 at 3:24 PM

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


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us