- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Divide one BigInteger from another BigInteger in Java
Use the BigInteger divide() method in Java to divide one BigInteger from another.
First, let us create some objects.
BigInteger one, two, three; one = new BigInteger("200"); two = new BigInteger("100");
Divide the above and assign it to the third object −
three = one.divide(two);
The following is an example −
Example
import java.math.*; public class BigIntegerDemo { public static void main(String[] args) { BigInteger one, two, three; one = new BigInteger("200"); two = new BigInteger("100"); // division three = one.divide(two); String res = one + " / " + two + " = " +three; System.out.println("Result: " +res); } }
Output
Result: 200 / 100 = 2
- Related Articles
- Subtract one BigInteger from another BigInteger in Java
- Multiply one BigInteger to another BigInteger in Java
- Convert BigInteger into another radix number in Java
- Create BigInteger from byte array in Java
- Get byte array from BigInteger in Java
- Negate a BigInteger in Java
- BigInteger class in Java\n
- Create BigInteger via string in Java
- Working with BigInteger Values in Java
- Math Operations on BigInteger in Java
- Shift right in a BigInteger in Java
- Shift left in a BigInteger in Java
- Performing Bitwise Operations with BigInteger in Java
- Set a bit for BigInteger in Java
- BigInteger Class in C#

Advertisements