What is a String ?

#1
String : String is a sequence of Characters.

- In the Java programming language, Strings are Objects.

The Java platform provides the String Class to create and manipulate Strings.

Example : String greeting = "Hello world!";

In this case, "Hello world!" is a string literal—a series of characters in your code that is enclosed in double quotes. Whenever it encounters a string literal in your code, the compiler creates a String object with its value—in this case, Hello world!.
 
#2
String represents collection of characters.

Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:

String str = "me";
is equivalent to
char str1 = {'m', 'e'};
String str2 = new String(str1);
 
#3
A string is a bordering (see contiguity) arrangement of images or qualities, for example, a character string (a grouping of characters) or a parallel digit string (a succession of double esteems).
 
Top