How to convert BigInteger to String in java

前端 未结 9 1644
眼角桃花
眼角桃花 2020-12-24 13:39

I converted a String to BigInteger as follows:

Scanner sc=new Scanner(System.in);
System.out.println(\"enter the message\");
String         


        
9条回答
  •  一整个雨季
    2020-12-24 13:50

    String input = "0101";
    BigInteger x = new BigInteger ( input , 2 );
    String output = x.toString(2);
    

提交回复
热议问题