CSC 2010 Lecture 20: Strings notes
Document Summary
So far in this course, we"ve seen what a class declaration looks like, and we"ve seen how to create objects and perform operations on them. Much of the time, however, we won"t need to create our own classes, because the java api (application. Programming interface, also called the java class library) provides a huge number of prewritten classes, ready for us to use. Of all the classes in the java api, the string class is probably the most important. Instances of the string class represent strings of characters, which are used in virtually every java program. The string class belongs to a package named java. lang. This package is automatically imported into every program, so we don"t need an import declaration in order to use string. By the way, java. lang is the only package that is automatically imported. All others must be specifically imported by using the import statement above your class declaration.