java
public static long jointArrayData(int[] nums) {
//定义变量存放数据
long num = 0;
//头尾"相加"
for (int i = 0,j = nums.length-1; i <= j; i++,j--) {
if (i!=j){
//String.valueOf先将Int转String,进行字符串的连接,再用Integer.parseInt方法转回Int
String str = String.valueOf(nums[i])+String.valueOf(nums[j]);
num += Integer.parseInt(str);
}else {
num+=nums[i];
}
}
System.out.println(num);
return num;
}