Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Java
10.8K+ articles
Java-Functions
4.2K+ articles
Java - util package
1.6K+ articles
Java-lang package
417+ articles
java-basics
330+ articles
java-guava
153+ articles
java-math
147+ articles
Java-math-package
88+ articles
Java-BigInteger
63 posts
Recent Articles
Popular Articles
BigIntegerMath binomial() function | Guava | Java
Last Updated: 03 August 2021
The binomial(int n, int k) method of Guava's BigIntegerMath class returns n choose k, also known as the binomial coefficient of n and k, that is, n! / (k! (n - k)!)Syntax:...
read more
Java
java-guava
Java-BigInteger
BigIntegerMath ceilingPowerOfTwo() function | Guava | Java
Last Updated: 03 August 2021
The ceilingPowerOfTwo(BigInteger x) method of Guava's BigIntegerMath class returns the smallest power of two greater than or equal to x. This is equivalent to BigInteger.v...
read more
Java
java-guava
Java-BigInteger
BigIntegerMath divide() function | Guava | Java
Last Updated: 15 November 2018
The method divide(BigInteger p, BigInteger q, RoundingMode mode) of Guava's BigIntegerMath class returns the result of dividing p by q, rounding using the specified Roundi...
read more
Java
java-guava
Java-BigInteger
Sum of first N natural numbers when N is extremely large
Last Updated: 27 January 2023
Given a positive integer n, the task is to find the sum of the first n natural numbers given that n is very large (1 ? n ? 1020000).Examples:Input: n = 4Output: 10 1 + 2 +...
read more
DSA
large-numbers
Java-BigInteger
BigInteger gcd() Method in Java with Examples
Last Updated: 04 April 2019
GCD (Greatest Common Divisor) or HCF (Highest Common Factor) of two numbers is the largest number that divides both of them. The java.math.BigInteger.gcd(BigInteger val) m...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger add() Method in Java with Examples
Last Updated: 04 April 2019
The java.math.BigInteger.add(BigInteger val) is used to calculate the Arithmetic sum of two BigIntegers. This method is used to find arithmetic addition of large numbers o...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger isProbablePrime() Method in Java with Examples
Last Updated: 03 April 2019
The java.math.BigInteger.isProbablePrime(int certainty) method is used to tell if this BigInteger is probably prime or if it's definitely composite. This method checks for...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger nextProbablePrime() Method in Java with Examples
Last Updated: 08 April 2019
The java.math.BigInteger.nextProbablePrime() is used to find the first integer greater than this BigInteger that is probably prime. If this method returns 'p' then there i...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger subtract() Method in Java with Examples
Last Updated: 08 April 2019
The java.math.BigInteger.subtract(BigInteger val) is used to calculate the Arithmetic difference of two BigIntegers. This method is applicable on large value numbers of ra...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger multiply() Method in Java with Examples
Last Updated: 12 April 2019
The java.math.BigInteger.multiply(BigInteger val) is used to calculate the multiplication of two BigIntegers. As BigInteger class internally uses an array of integers for ...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger divide() Method in Java with Examples
Last Updated: 07 June 2019
The java.math.BigInteger.divide(BigInteger val) is used to calculate the division of two BigIntegers. BigInteger class internally uses array of integers for processing, th...
read more
Java
Java-Functions
Java-BigInteger
Java-math-package
BigInteger sqrtAndRemainder() Method in Java with Examples
Last Updated: 15 April 2019
The java.math.BigInteger.sqrtAndRemainder() method performs an operation upon the current BigInteger by which this method is called. This method is used to calculate the i...
read more
Java
Java-Functions
Java-BigInteger
Fermat's Factorization method for large numbers
Last Updated: 24 February 2024
Given a large number N, the task is to divide this number into a product of two factors, using Fermat's Factorisation method. ExamplesInput: N = 105327569 Output: 10223, 1...
read more
Mathematical
Java Programs
Write From Home
DSA
large-numbers
factor
Java-BigInteger
Top 12 Computer Vision Trends in 2025
Last Updated: 17 June 2025
Machines used to be blind, but computer vision gave them eyes! Now we can teach them to "see" like us, blurring the lines between real and digital with things like augment...
read more
GBlog
Tatvasoft
Intellipaat
PrimeNG-DragDrop
Boats and Streams
C++-Misc C++
QA - Placement Quizzes-Data Interpretation
Algorithms-InsertionSort
Permutation and Combination
JP Morgan
SQL-PL/SQL
Java-BigInteger
Perl-Scalars
Java-Sql package
CSS-Functions
Java-SecureRandom
TCS-coding-questions
B-Tree
SalesFor
Volkswagen IT Services
Python-Asynchronous
Computer Vision
AI-ML-DS Blogs
Generative AI
AI-ML-DS
Computer Vision Blogs
GBlog 2025
Convert a String to a BigInteger in Java
Last Updated: 12 February 2024
In Java, the BigInteger class is a part of the java.math package and is designed to handle arbitrary precision integers. Unlike primitive data types such as int or long, w...
read more
Java
Java Programs
Picked
java-math
Java-BigInteger
Java-String-Programs
Java Examples
1
2
3
4
5
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !