String class provides many constructors to create a new String object from character array, byte array, StringBuffer, StringBuilder, etc.
Constructor | Purpose |
---|---|
String() | Creates an empty string. |
String(String) | Creates a string from the specified string. |
String(char[]) | Creates a string from an |
Strings can be constructed a variety of ways.
These are explained in detail in the following sections. Read more…
The output of
Person
Person
We are trying to invoke Read more…
static data_type variableName;
Where, is optional.