像下面这段代码,else那里是会报错的,“variable declaration not allowed here”,因为Java认为int sum = (b_len–) - '0’这句话是两句,int sum和sum = (b_len–) - ‘0’
while (a_len >= 0 || b_len >= 0) {
if (a_len >= 0) {
int sum = a.charAt(a_len--) - '0';
}
else
int sum = b.charAt(b_len--) - '0';
}