已知一个字符串,返回将字符串中的非字母字符都删除后的字符串

//class StringEditor

public class StringEditor { public static String removeNonLetters(String original) { StringBuffer aBuffer=new StringBuffer(original.length()); char aCharacter; for(int i=0; i

【已知一个字符串,返回将字符串中的非字母字符都删除后的字符串】//class StringEditorTester
public class StringEditorTester { public static void main(String args[]) { String original="hello123,my name is mark,234i think you are my classmate?!!"; System.out.println(StringEditor.removeNonLetters(original)); } }


结果


    推荐阅读