本文介绍了如何在Java中输入BigInteger类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试获取Integer类型的输入时,我只需要做的就是下面的代码.
when I tried to get an input of type Integer, what I only needed to do was the code below.
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
但是关于BigInteger,我不知道该怎么办.如何读取用户的BigInteger类型输入?
but when it comes to BigInteger,I don't know what to do. What can I do to read a BigInteger Type input from the user?
推荐答案
Scanner sc = new Scanner(System.in);
BigInteger bi = sc.nextBigInteger();
这篇关于如何在Java中输入BigInteger类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!