I\'ve read that in Java an object of type String can\'t change. But int and char variables can. Why is it? Can you give me an example?
Thank you. (I am a newer -_- )
int and char can't change either. As with strings, you can put a different value into the same variable, but an integer itself doesn't change. 3 will always be 3; you can't modify it to be 4.