9 String and StringBuilder Classes

 

After reading lesson 9, you will be able to:

  • Work with strings
  • Convert from numbers to strings and vice versa
  • Choose the correct String method (toLower, toUpper, etc.)
  • Use the StringBuilder class

This lesson introduces the topic of strings in Java.  In Java, strings are objects. A string represents as a sequence of individual characters, such as a word or sentence. The String class is widely used in Java and has over sixty methods and thirteen constructors. in addition to the String class, Java also has a StringBuilder class. 

9.1   Working with strings

9.2   Converting between numbers and strings

9.3   String methods

9.4   StringBuilder class and methods

9.5   Summary