Joanne Neal wrote:It's nothing to do with the immutability of Strings. Method calls cannot be used on the left hand side of an assignment expression.
Okay, but why can't you have an expression on the LHS? In Perl and some BASICs you can do this:
Perl allows this because in Perl, strings are mutable. The reason Java doesn't is because strings are immutable.