Any Java Experts? More Help! - Fantasy Baseball Cafe 2014 Fantasy Baseball Cafe
100% Deposit Bonus for Cafe Members!

Return to General Talk

Any Java Experts? More Help!

Moderator: Baseball Moderators

Re: Any Java Experts? More Help!

Postby Tavish » Thu Jan 28, 2010 12:28 am

You are skipping the first even term in your loop. Your first evaluation is 3+2.

Bury me a Royal.
Mod in Retirement
Mod in Retirement

User avatar
CafeholicFantasy ExpertCafe WriterCafe RankerMock(ing) DrafterEagle EyeCafe SpotterWeb Supporter
Posts: 11070
(Past Year: 26)
Joined: 3 May 2004
Home Cafe: Baseball

Re: Any Java Experts? More Help!

Postby sox 06 » Thu Jan 28, 2010 12:05 pm

Tavish wrote:You are skipping the first even term in your loop. Your first evaluation is 3+2.

Ah there you go! I feel like an idiot sometimes with this Java stuff !+) But I'm getting better :-D

Alright, another question. I've gone on Google to look for this, but I've been a bit confused about what I've read. How do you add a string of numbers together? I have the code written for 2 raised to the 1000th power, but now I need to add each digit in that answer and print out the sum. Do I need to use something like a toString in the BigInteger class? Here is what I have so far:

sox 06
General Manager
General Manager

User avatar
CafeholicEagle Eye
Posts: 4425
Joined: 22 Apr 2006
Home Cafe: Baseball


Return to General Talk

Who is online

Users browsing this forum: No registered users and 5 guests

Forums Articles & Tips Sleepers Rankings Leagues

Today's Games
Monday, Sep. 15
(All times are EST, weather icons show forecast for game time)

Toronto at Baltimore
(7:05 pm)
Washington at Atlanta
(7:10 pm)
Miami at NY Mets
(7:10 pm)
NY Yankees at Tampa Bay
(7:10 pm)
Cincinnati at Chi Cubs
(8:05 pm)
Detroit at Minnesota
(8:10 pm)
Chi White Sox at Kansas City
(8:10 pm)
Cleveland at Houston
(8:10 pm)
LA Dodgers at Colorado
(8:40 pm)
San Francisco at Arizona
(9:40 pm)
Seattle at LA Angels
(10:05 pm)
Philadelphia at San Diego
(10:10 pm)

  • Fantasy Baseball
  • Article Submissions
  • Privacy Statement
  • Site Survey 
  • Contact