Check out the following trail on threads at java.sun.com,
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
it discusses synchronization and when you need to use it.
-jeff
On Tuesday, March 11, 2003, at 02:41 PM, Ashish Kulkarni wrote:
Hi,
I have a following class with 2 static methods, should i make the methods synchronized?? I would not make then synchronized, if those where independent, but i am not sure since one method is calling other to get some data I will call this method from any class String a = MyClass.getOtherThing("123"); or String b = MyClass.getSomeThing("567"); (this is just a example code)
public class MyClass { public static String getSomeThing(String abc) { // some logic return "1"; }
public static String getOtherThing(String abc) { // calling method getSomeThing here String s = getSomeThing(abc); // do some logic and return result return "2"; } }
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]