charact Flashcards
A class whose instances can hold a single character value and whose methods manipulate and inspect single-character data
Character
A class for working with fixed-string data—that is, unchanging data composed of multiple characters
String
Classes for storing and manipulating changeable data composed of multiple characters
StringBuilder and StringBuffer
is a named object of the String class.
String Variable
Strings are ______ (cannot be changed)
immutable
a comparison based on the integer Unicode values of character
a lexicographical comparison –
- ignores case when determining if two Strings are equivalent.
equalsIgnoreCase()
-to compare two Strings, it provides additional information to the user in the form of an integer value
compareTo()
- convert any String to its uppercase or lowercase equivalent.
toUpperCase() & toLowerCase()
- _____ - is an accessor method that returns the length of a String
length()
______- determines whether a specific character occurs within a String.
indexOf()
requires an integer argument that indicates the position of the character that the method returns, starting with 0.
charAt()
methods each take a String argument and return true or false if a String object does or does not end or start with the specified argument. It is also case sensitive
endsWith() and startsWith()
allows you to replace all occurrences of some character within a String. It is also case sensitive.
- replace() -
method is defined for other classes to convert their objects to strings. (Not part of String class but a part of Object class). You can also use concatenation to convert any primitive type to a
string using + operator
toString()