Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes get,set ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "get,set !" Watch "get,set !" New topic
Author

get,set !

Anas El-Abboud
Ranch Hand

Joined: Dec 12, 2003
Posts: 31
hi..
would you tell me the way i can make : get() in class to parameters in another class without set() in the last one ?
thanks , please with simple example..


We work in mud to reach sky ..
Ben Buchli
Ranch Hand

Joined: Mar 26, 2004
Posts: 83
Hi, I dont understand your question, you might want to rephrase it.
Ben
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Originally posted by Anas El-Abboud:
would you tell me the way i can make : get() in class to parameters in another class without set() in the last one ?

If my understanding is correct, you're trying to code a class that has getter methods that will get values in another another class.
This isn't the normal way that we do things. Every POJO has its own set of getter & setter methods to allow another class to access/change its values. Not the other way round, as what you're trying to do.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Anas El-Abboud
Ranch Hand

Joined: Dec 12, 2003
Posts: 31
thanks Cheng ! , i know that is not the normal way..
but in a sender class it was sending values to the receiver all the methods in the first setting values were had a getter method but in the second class !
i donn't know if that was right .but !
thanks again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get,set !
 
Similar Threads
Using get/set vs. direct access to private variables
Accessor and Mutator in Java Beans
Can't get a result set!
When I must use Getters and Setters?
Removing extra #text elements from DOM tree