String constant invariance

First, the main method into the stack memory, and then create a string constant to memory, that is, an array of characters, once created can not be changed ,, str points to the array of characters

Then create another string constants itheima in heap memory, and then point to the character array str.

Guess you like

Origin blog.csdn.net/qq_36897901/article/details/81160110