Question: I know that Strings are immutable.

Then, what is the difference between:

```
String name ="Name";
final String name ="Name";

```

Why do we use `final` in this context? Because String is already immutable there seems to be no need. Second related question, why are String's `immutable`?. Other Data Types like int, boolean are not. If String is immutable does that make it thread-safe? I read that **"if String been mutable, a request to load "java.io.Writer" could have been changed to load "mil.vogoon.DiskErasingWriter""** `means` ?

Answer: 
There are a lot of questions here, but here are a few notes that should answer most of them:

* `final` means the variable can be assigned only once. It has nothing to do with mutability, which is a property of the object, rather than the variable (which is simply a handle)
* `String` is immutable, because you can't change its internal state (it has a `private char[] chars` that hold the characters). Primitives are also immutable. This is better visible in their wrapper equivalents - `Integer`, `Long` etc.
* yes, a String is thread-safe, because its state cannot be changed no matter how many threads work with it. Every operation on the string results in a new instance, rather than changing the existing one.
`final` means you cannot assign the variable a new value.

```
String name = "Name";
name = "MyName"; // legal

final String name = "Name";
name = "MyName"; // illegal, compiler error

```

Here is an article on why strings are immutable:

<http://javarevisited.blogspot.com/2010/10/why-string-is-immutable-in-java.html>