Question: Strings are immutable, does it mean that i always have to do something like that with a string passed to a method?

```
str= str.toLowerCase();

```

or is 

```
str.toLowerCase();

```

fine? I tried the second one and it doesn't give me any errors, why?

Answer: 
You need to assign:

```
str = str.toLowerCase();

```

These methods return a *new* String - they don't *modify* the String.
You should use the first version

```
str = str.toLowerCase(); // the right way

```

since it replaces the reference to the old `String` instance with a reference to the new all lowercase instance. The second version

```
str.toLowerCase(); // the wrong way

```

does not change the `String` instance referred to by `str` (which is what *immutability* means), but returns a new all lowercase instance which is then ignored.