I want to store a big number, which cant be stored "long" data type. How to do?
Solution is : BigInteger class of java.math package in Java
It has lots of helpful methods to do operations on it.For more information :
http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigInteger.html
Example Program:
http://www.roseindia.net/java/java-biginteger/java-biginteger.shtml
To store large decimals we have BigDecimal class in same package.
No comments:
Post a Comment