How to convert public key to BigInteger?

Question about syntax in "new BigInteger" (Java)?

  • Alright well I just have a question about what part of the code the 10 after the comma in the following line signifies: new BigInteger("1", 10); Like in strings you have two sections, the text and then the input for the variables such as %d %f... Obviously the 10 means something, I just don't know what. Full code: import java.math.BigInteger; class biginteger { public static void main( String[] args ){ int n,a; BigInteger nuke,factorial; System.out.printf("Enter the integer.\n"); try { InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(input); n = Integer.parseInt(reader.readLine()); factorial = new BigInteger("1", 10); for (a=1; a<=n; a++) { nuke = new BigInteger("" + a + "", 10); factorial = factorial.multiply(nuke); } System.out.println("The factorial of " + n + " is:\n"); System.out.println(factorial); } catch ( Exception e ) {} } }

  • Answer:

    The radix is the base (10) - the decimal number system.

cid at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Bookmark this link: http://java.sun.com/j2se/1.5.0/docs/api/index.html Or, look up the 1.6 page, and bookmark that. All questions of this nature can be answered on the Sun Java Documentation pages.

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.