[英]How to use BigInteger value to initialize String Array?
我正在編寫一個程序,並堅持使用下面的BigInteger問題。
BigInteger noOfCombinationForWordsToBeSearchedBig = factorial(noOfWordsToBeSearched);
String[][] combinationForWordsToBeSearched = new String[ noOfCombinationForWordsToBeSearchedBig.longValue()][noOfWordsToBeSearched];
我想用noOfCombinationForWordsToBeSearchedBig
值初始化String[][]
數組。
例如,我發現階乘17是一個大整數。
請指教。
數組索引不能超過Java中的Integer.MAX_VALUE
。 實際上,它比Integer.MAX_VALUE
少得多。 因此,實際上在創建數組時不能將BigInteger
用作size參數。
有關詳細信息, 請參見此處 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.