String Flashcards
It is a sequence of zero or more characters from the Unicode character set.
String
It is the sequence consisting of zero characters
Null string
What is it called when an object cannot be changed?
Immutable
Does a string change once created?
NO
If a string does not change once created, what happens instead?
Methods produce new strings from old ones
A representation for a string value within the program text
String Literal
In Java, it is a sequence of zero or more graphic characters from the Unicode character set or escape sequences, enclosed in double-quotes
String Literal
What is the syntax for string declaration?
String varname = value;
What does the following String function do?
charAt (int i)
Character at position i
What does the following String function do?
compareTo (String t)
Compare with t
What does the following String function do?
concat (String t)
Concatenation with t
What does the following String function do?
equals (String t)
Same characters as t
What does the following String function do?
equalsIgnoreCase
Same characters as t (ignoring case differences)
What does the following String function do?
indexOf (char c)
Position of the first occurence of c
What does the following String function do?
indexOf (String t)
Position of the first occurence of t
What does the following String function do?
length ()
Number of characters in String