用String中的substring函數
思路:
substring(int beginIndex)函數從beginIndex截取到末尾
substring(int beginIndex, int endIndex)函數從beginIndex截取到endIndex-1下標的字符串
String a = "abc";
String b = "ghijk";
String temp = a + b;
b = temp.substring(0, temp.length() - b.length());
a = temp.substring(b.length());