Delete comment from: Javarevisited
Another solution would be to use BigInteger:
public static int add(int a, int b) {
BigInteger i = BigInteger.valueOf(a);
BigInteger j = BigInteger.valueOf(b);
BigInteger sum = i.add(j);
return sum.intValue();
}
Jun 18, 2013, 11:15:34 AM