C++ supports strings in two ways. The first way is the C convention of using a null- terminated character array. The second is by using the String class. Java defines a String class that encapsulates a sequence of Unicode characters . The String class defines a wide variety of methods that can be used to create, modify, and manipulate strings. A Java String is by definition an object rather than an array of characters. Both Java and C++ use the + operator to concatenate two strings. The C++ language does not fully support all Unicode characters. A char in C++ is 1 byte. In Java, a char is 2 bytes, meaning that a Java char can represent any Unicode character. |