Scott Grissom
School of Computing & Info Systems
Grand Valley State University
picture

Lab: Ch 5 String Manipulation

Preparation

Do the following before arriving at lab:

  • Read chapter 5.1 - 5.5
  • Bring your textbook to lab

Objectives

After completing this lab, you should be able to:

  • read the online Java documentation
  • use a variety of String methods to manipulate data

Exercises

Strings

Java Strings include a large number of methods at your disposal. You will need to learn how to use several of them to complete this lab. Read about the String methods in the online Java Documentation. It can also be accessed from the BlueJ -> Help menu.

  • trim()
  • length()
  • toLowerCase()
  • substring()
  • charAt()
  • indexOf()
JavaBat
  • Complete five exercises from the String 1 category at JavaBat.com
  • Complete five exercises from the String 2 category at JavaBat.com

Grading Criteria

This lab is worth a possible 10 points. Turn in a printout of the source code.

  • Show your instructor your Done page (10 pts)