Question: what is the main difference between java strings and c c++ strings?
Answer: in c++ strings are already treated as array of characters, but in java String is a built in class. it is different from array of characters. In C++, a string is typically just an array of (or a pointer to) chars, terminated with a NULL (\0) character.