String.charAt(),找不到源 新手哦,不懂怎么弄 程序如下:package smilelee; /** * 将str1的部分字符复制到str2 * @author Administrator * */ public class WhileDemo { public static void main(String[] args) { String str1="You are a good boy,but you're not the best one!"; StringBuffer str2=new StringBuffer(); int i=0; char c=str1.charAt(i); while(c!='d') { str2.append(c); str1.charAt(++i); } System.out.println("This is the str2:"+str2); } }