how to convert BigInteger to String in java

Posted by Bipul on Stack Overflow See other posts from Stack Overflow or by Bipul
Published on 2010-06-12T10:43:43Z Indexed on 2010/06/12 10:53 UTC
Read the original article Hit count: 174

Filed under:

i converted a string to BigInteger as follows:

 Scanner sc=new Scanner(System.in);
      System.out.println("enter the message");
      String msg=sc.next();
      byte[] bytemsg=msg.getBytes();
     BigInteger m=new BigInteger(bytemsg); 

now i want my string back.i m using m.toString() method but not getting desired result. why??? what is bug in it and what is its remedy.

© Stack Overflow or respective owner

Related posts about java