Introduction to Programming (CPSC 124)
—Hobart & William Smith Colleges, Fall 2014
Class Notes—October 29, 2014
Home | Syllabus | Calendar | Class Notes | Labs and Projects | General Notes |

Some Character methods

String objects

The String class comes with a very rich set of methods, available on each object. We're going to expand that today, building a library of even more methods, some useful and others just fun. Like all libraries, these will be static methods, but we'll make generous use of the instance methods that come with every String object.

All methods will be added to the class file StringLib

We spent a rapid-fire 20 minutes sketching out solutions to these problems today. Obviously, it's better for you to finish these on your own, but if you must peek, here is a copy of my version: StringLib.java.


John Lasseter