Hey, I just met you,
and this is crazy,
but here‘s my number
so call me, maybe?
1 @Test 2 public void testTel(){ 3 4 int[]arr=new int[]{8,2,1,5,7,4,9}; 5 int[]index=new int[]{2,0,1,1,2,6,3,0,5,4,6}; 6 7 String tel=""; 8 for(int i:index){ 9 tel+=arr[i]; 10 } 11 System.out.println("My Number is:"+tel); 12 }
时间: 2024-11-06 10:12:29