问一个问题 ,
我有3段 字符串 已经赋值到 temp1 temp2 temp3 里面 打印出来是 A75453503
B40355645
C43695464 想请问怎么样可以把前面的 第一个字符去掉 。
就是 A B C
最后再把这3段 合并到一起
组成一个新的字符串
大虾帮助 可以马上发钱
我有3段 字符串 已经赋值到 temp1 temp2 temp3 里面 打印出来是 A75453503
B40355645
C43695464 想请问怎么样可以把前面的 第一个字符去掉 。
就是 A B C
最后再把这3段 合并到一起
组成一个新的字符串
大虾帮助 可以马上发钱
public static void main(String[] args) {
String str1 = "A@324234";
String str2 = "B@123134";
String str3 = "C@242";
StringBuilder sb = new StringBuilder();
sb.append(str1.substring(1));
sb.append(str2.substring(1));
sb.append(str3.substring(1));
System.out.println(sb.toString());
}
string b = temp2.substring(1)
string c = temp3.substring(1)string temp=a+b+c
temp1.replaceFirst("\\p{Lu}","");
temp2.replaceFirst("\\p{Lu}","");
temp3.replaceFirst("\\p{Lu}","");
String temp=temp1+temp2+temp3;