Synchronization & Immutable

What is synchronization? and what does immutable mean? Are they related?Can anyone explain these two with code examples.How can u create immutable objects in java? What is use of them?
[205 byte] By [ReshmiDamodara] at [2007-10-2 23:53:16]
# 1

> What is synchronization?

Preventing concurrent access by more than one thread.

> and what does immutable

> mean?

An object that cannot have its state changed is said to be immutable.

> Are they related?

No. Yes. Somewhat. Given the above explanations, can you think of something relevant? Think about what could be the dangers of unguarded concurrent access, and how that relates to mutability.

> How can u create immutable objects in java? What is

> use of them?

You are really incredibly lazy, aren't you.

Lokoa at 2007-7-14 16:39:08 > top of Java-index,Core,Core APIs...
# 2
> > How can u create immutable objects in java? String s = "";There. I've just created an immutable object.
BillKriegera at 2007-7-14 16:39:08 > top of Java-index,Core,Core APIs...