This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes difference between Integer and BigInteger Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "difference between Integer and BigInteger" Watch "difference between Integer and BigInteger" New topic
Author

difference between Integer and BigInteger

kushwanth
Greenhorn

Joined: Oct 26, 2007
Posts: 3
Hello All
I have a doubt please clarify this
what are the major differences between primitive int,java.lang.Integer,java.math.BigInteger

and How can i make use of BigInteger class

thanks all in advance
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

"kushwanth" (previously "prutvi raj"),

You've been warned before about your display name, which does not meet the JavaRanch Naming Policy. You can edit your display name here. Thank you for your prompt attention!

With respect to your question, have you checked the API documentation?
[ December 16, 2007: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Phani Burra
Ranch Hand

Joined: Dec 13, 2007
Posts: 52
Integer is a wrapper of the primitive type int.The wrapper classes are basically used in cases where you want to treat the primitive as an object for ex-trying to pass an int value in a method that would take only a type of Object in such a case you would want to wrap primitive int value in the wrapper Integer which is of type Object. To know specific advantages of Integer I would suggest you to take a look at the Integer api provided by Sun.

Now coming to the BigInteger, you would use it in calculations which deal with very large numbers.The use of BigIntegers is in Security where typically it is used for keys specifications.For more info on BigIntegers take a look at the following link http://java.sun.com/j2se/1.4.2/docs/api/java/math/class-use/BigInteger.html

I hope the info helped you.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: difference between Integer and BigInteger
 
Similar Threads
how to calculate the N to the power of N
BigInteger
Help! Question on converting String to BigInteger
how to apply arthmetic operation on String containing only large number of digits
Need help with Big Integer