问一个问题 ,
我有3段 字符串 已经赋值到  temp1 temp2 temp3  里面        打印出来是  A75453503
                 B40355645
                 C43695464     想请问怎么样可以把前面的 第一个字符去掉 。
       就是  A B C 
    最后再把这3段 合并到一起
    组成一个新的字符串
大虾帮助  可以马上发钱

解决方案 »

  1.   

    lz马上结贴给分, 后面的兄弟不要跟上了.  lz随时准备结贴
        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());

        }
      

  2.   

    string a = temp1.substring(1)
    string b = temp2.substring(1)
    string c = temp3.substring(1)string temp=a+b+c
      

  3.   


    temp1.replaceFirst("\\p{Lu}","");
    temp2.replaceFirst("\\p{Lu}","");
    temp3.replaceFirst("\\p{Lu}","");
    String temp=temp1+temp2+temp3;
      

  4.   

    (temp1+temp2+temp3).repleaceAll("\\w", "");