FileDocCategorySizeDatePackage
ContinueDemo.javaAPI DocExample584Tue Dec 12 18:58:12 GMT 2000None

ContinueDemo

public class ContinueDemo extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


        StringBuffer searchMe = new StringBuffer(
                  "peter piper picked a peck of pickled peppers");
        int max = searchMe.length();
        int numPs = 0;

        for (int i = 0; i < max; i++) {
	    //interested only in p's
            if (searchMe.charAt(i) != 'p")
	        continue;

	    //process p's
	    numPs++;
            searchMe.setCharAt(i, 'P");
        }
        System.out.println("Found " + numPs + " p's in the string.");
        System.out.println(searchMe);