Following is the program that I wrote for Socket client. In method2 of the program i am instantiating the class MyClass and then calling all the methods as <obj>.<methodname> in this method. This method2 will be called with different params . Could you please advise me if it is possible/better if instead of instatiating the class i make all those methods as static.
(edited by Cindy to format code) [ April 11, 2002: Message edited by: Cindy Glass ]
posted 13 years ago
If you make them static then you have to watch your synchronization. But WHY would you do either? If someone called this class, why don't you just use the "this" instance to call the methods?
"JavaRanch, where the deer and the Certified play" - David O'Meara