Você está na página 1de 3

STRINGS

Definition:
a sequence of characters objects of type String Cannot change a string object a new String object is created that contains the modifications

CONSTRUCTORS

String()- Default Constructor


Example- String s = new String()

String(char chars[ ])-initialized by an array of characters


char chars[] = { 'a', 'b', 'c' }; String s = new String(chars);

String(char chars[ ], int startIndex, int numChars)specify a subrange of a character array

Você também pode gostar