for(int i = 0; i < n; i++) {
num += digits[i]*(10^(n-1-i));
System.out.println(10^(n-1-i));
}
My purpose is to change a array representation of a number into Integer representation. For example, [9,9] is 9*(10^1) + 9*(10^0) = 90+9 = 99.
However, the output of 10^(n-1-i)
is:
11
10
Is anything wrong with my code, or there is the other way to operate "^"? Thank you.