05.0 Java Notes‎ > ‎

Java: String

String is a Java supplied class including a number of methods to perform actions on Strings.  

All Java String methods can be found in Java's API

Some String Methods

compareTo()Used to compare the values of two strings. 
concat() Concat is short for concatenation, which means to join two strings together
indexOf()find the position of the first occurrence of the string within a string
length()  determines the length of a string
substring()Extracts a part of a string
trim() removes leading and trailing spaces from a string.