This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes I would like  to optmise multiplication ,please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "I would like  to optmise multiplication ,please help" Watch "I would like  to optmise multiplication ,please help" New topic
Author

I would like to optmise multiplication ,please help

krishna kumar.s
Greenhorn

Joined: Oct 01, 2011
Posts: 19
To solve one of the puzzles I need to find the multiplication of a number which yields <2 .I used below code which takes 8hrs adn does go upto 10000, can anybody suggest a better efficient method for multiplication?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41076
    
  43
I'm not sure what the algorithm is supposed to do, but you're much better off handling large integers by using the java.math.BigInteger class than by using strings.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I would like to optmise multiplication ,please help
 
Similar Threads
Fibonacci Sequence Problem
My java calculator does not give the expected output ! !!?
To find the Medium
three for Loops?
Scanner class help