how to read 25 digit number in java????
i want to write a porgram to perform addditon and substraction between 25 digit numbers
kishore sy 0 Newbie Poster
Recommended Answers
Jump to PostHave you tried looking at the BigInteger class:
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/math/BigInteger.html
Jump to PostHave you tried looking at the BigInteger class:
http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/math/BigInteger.htmlHave you looked at the link I provided?
What is the point of making questions if you don't bother to read people's answers?
Jump to PostEach hexadecimal digit represents four binary digits (bits) (also called nibble), and the first use of hexadecimal notation is a representation of the binary values encoded nice man on the computer and digital electronics.
Jump to PostJust look at the API of the class BigInteger. Use the constructor to create the object and use the methods it has for adding, subtracting, ....
BigInteger bi1 = new BigInteger("123123414123412341241243");
Jump to Posthttp://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/math/BigInteger.html
//BigInteger(String val) //Translates the decimal String representation of a BigInteger into a BigInteger. BigInteger bi1 = new BigInteger("123123414123412341241243");
If you look at that link you will find the methods that do what you want. Create 2 BigInteger objects and then call the methods …
All 17 Replies
-Ice- 0 Newbie Poster
kishore sy 0 Newbie Poster
-Ice- 0 Newbie Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kishore sy 0 Newbie Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kishore sy 0 Newbie Poster
akshay357 0 Newbie Poster
swagerr 0 Newbie Poster
kishore sy 0 Newbie Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kishore sy 0 Newbie Poster
kishore sy 0 Newbie Poster
kishore sy 0 Newbie Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kishore sy 0 Newbie Poster
kishore sy 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.