import java.util.Scanner;标签:全忘,String,System,小东西,干净,split,static,public,out From: https://www.cnblogs.com/capo-0737/p/18429999
public class NewT {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in).useDelimiter("\n");
String s = scanner.next();
if (s!=null){
System.out.println("检测您输入的为:");
CharRepeat(s);
CharSplit(s);
}
}
public static void CharRepeat(String str){
System.out.println(str);
// 测试一下重复输出的方法自定义与创造
}
public static void CharSplit(String st){
String[] the_split = st.split(" ");
for(String string : the_split){
System.out.print(string + "__");
// 测试一下字符串能否进行切割
}
}
}