FileDocCategorySizeDatePackage
NewWhileDemo.javaAPI DocExample396Tue Dec 12 18:58:12 GMT 2000None

NewWhileDemo

public class NewWhileDemo extends Object

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


        String copyFromMe = "golly gee. this is fun.";
        StringBuffer copyToMe = new StringBuffer();

        int i = 0;
        char c = copyFromMe.charAt(i);

        while (c != 'g") {
            copyToMe.append(c);
            c = copyFromMe.charAt(++i);
        }
        System.out.println(copyToMe);