StringManipulatorS - change = change.substring...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// The "StringManipulatorS" class. public class StringManipulatorS { public static String getNewStr (String change){ System.out.println ("Please enter a string.");//1 change = StdIn.readString(); change = change.trim(); if (change.length () > 50) change = change.substring(0,50); change = change.tring(); return change; } public static String initialCaps (String change){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: change = change.substring (0,1).toUpperCase(); for (int i = 0; i < change.length; i++){ if ( (change.substring(i, i+1).equals(" ") ) change = change.substring (i+1,i+2).toLowerCase(); public static void main (String args) { // Place your code here } // main method } // StringManipulatorS class...
View Full Document

This note was uploaded on 12/01/2010 for the course APPLIED SC 142 taught by Professor Professorstansimmons during the Winter '10 term at Queens University.

Ask a homework question - tutors are online