public static String sumStr(String longNum,String shortNum){
byte[] shotNumArr = new byte[longNum.length()];
int cha = longNum.length() - shortNum.length();
List<Integer> sumIntVal = new ArrayList<>();
List<Integer> result = new ArrayList<>();
for (int i=0;i<longNum.length();i++){
if (i<cha){
shotNumArr[i] = "0".getBytes()[0];
}else {
shotNumArr[i] = shortNum.getBytes()[i-cha];
}
}
for (int i=0;i<=longNum.length()-1;i++){
byte[] tempA = new byte[]{longNum.getBytes()[i]};
byte[] tempB = new byte[]{shotNumArr[i]};
sumIntVal.add(Integer.parseInt(new String(tempA)) + Integer.parseInt(new String(tempB)));
}
Collections.reverse(sumIntVal);
int tempF= 0;
for (int i=0;i<sumIntVal.size();i++){
Integer temp = sumIntVal.get(i);
if (i > 0){
temp = temp + tempF;
}
result.add(temp>=10?temp-10:temp);
tempF = temp >= 10?1:0;
}
if (tempF == 1){
result.add(1);
}
Collections.reverse(result);
StringBuilder r = new StringBuilder();
result.forEach(r::append);
return r.toString();
}