6.2.2 The String class 

Previous Index Next 


 
The String class provides methods for manipulating strings some of these methods are detailed below. For a full list look at the Java API documentation.
 
 
charAt Returns the charcater at the specified position in the string. The positions in the string are 0 based.
endsWith Returns true if the string the method is called on ends with the string specified.
indexOf Returns the position of the specified string with in the string the method is called on.
length Returns the length of the string.
substring Returns a substring of the string the method is called on.
toLowerCase Returns the string lower-cased.
toUpperCase Returns the string upper-cased.
valueOf This static method converts the supplied datatype to a string.

 



Source   1