Use Java processing, and you cannot use the Spilit method
Package Com.foreverlover;import Java.util.scanner;public class Flipstring {public static void Filp (String str) {string[] Flip = new string[100];char[] ch = str.tochararray (); int flag = 0;flip[flag] = "";//must be initialized to NULL, otherwise the default is null object for (int i = 0; i < ch.length; i + +) if (ch[i]! = '. ') Flip[flag] + = Ch[i];else{flag ++;flip[flag] = "";//the assignment is null}for each initialization (int j = Flag; J >= 0; J--) if (j! = 0) System.out.print (flip[j] + "."); ElseSystem.out.println (Flip[j]);} Test method public static void main (string[] args) {when (true) {Scanner in = new Scanner (system.in); String str = in.nextline (); FILP (str);}}}
How to split a string of strings into a specific character after a flashback output, such as: www.baidu.com output to com.baidu.com