The following code is for debugging:
public static void main(String[] args) {
BigInteger n = new BigInteger("10000000001");
String sn = n.toString();
char[] array = sn.toCharArray();
//intend to change value of some char in array
//not standard math operation
BigInteger result = new BigInteger(array.toString());
}
It gives me error:
Exception in thread "main" java.lang.NumberFormatException: For input string: "[C@86c347"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.math.BigInteger.<init>(BigInteger.java:316)
at java.math.BigInteger.<init>(BigInteger.java:451)
at debug.main(debug.java:14)
But it was working fine, until this case, I'm not quite sure what went wrong.
array.toString()since it seems to be an invalid input string for the BigInteger constructor.it was working fine, until this casecould you show some other cases where it worked fine?