Sponsored Link •
|
Advertisement
|
Advertisement
|
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.
Message:
Ok i was wondering how to use a Get method in the following situation : 1) Lets assume i have a a class called Class1. And Class has a method called method1. Now method1 does not return any values. However within method1 there is a String value. Now i know its strange that method1 produces a string value but it doesn;t return it.. but work with me here.. this is an actual situation i have encountered..Lets say the string value is String name1 ; 2)Ok now if we have another class called Class2. And we want the Class2 to print name1. 3)How do we use a get method or some method to get this value name1 and transfer it to Class2. 4)Oh and i know how to make a variable global already and well i do not want to use this method becasue it casues some difficulties later on in my program. 5)Oh and thank for helping me out...
Replies:
|
Sponsored Links
|