public class PlusDemo {

public static void main(String[] args) {
         String s="test";
         int v1 = 2,v2 = 4, v3 = 5;
         s= s+v1+v2+v3;
         System.out.println(s);
        //Ans test245

        String x="test";
        x= v1+v2+v3+x;
        System.out.println(x);
       //Ans:11test

        String y="test";
          y= v1+v2+(v3+y);
       System.out.println(y);
      //Ans: 65test

         String i="test";
         i= i+v1+v2*v3;
        System.out.println(i);
        //Ans: test220
   }

}

arrow
arrow
    全站熱搜

    wealthy 發表在 痞客邦 留言(0) 人氣()