以下代码用于调试:
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());
}
它给了我错误:
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)
但它工作正常,直到这种情况下,我不太确定出了什么问题。