I have a sinlgeton object which holds one method, witch is NOT synchronized. The singleton can be accessed by many clients at a time – what will happen if multiple clients access that object ? Will the object reference be provided to them in a First come- first serve manner…that is, would one client have to wait for the first one to finish the object, or it will be given the same object reference in memory ?
I get a weird feeling about the method in the singleton which is not synchronized. If 2 clients call Singleton.method(param), with different params – they wont create problems for each other right ?
If your method does not use any shared state (e.g. singleton fields), this is completely safe. Method parameters are passed on the thread stack – which is local and exclusive to the stack.
Think about two processors running the same code but operating on different areas in memory.