Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Java 4b ???

 
Andy Boyd
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am stuck on this and need some help. I am having difficulty breaking up the large number into something that I can use. I took my assignment from 4a and converted it to work with numbers up to 999, and made that into a method that I can call. What I need to figure out is the best way to break up the number 999,999,999,999 into 3 digit pieces. I don't know if I should use sub-strings and then parse the integers from those strings or use some math to divide this number up. Any help or insight would be greatly appreciated. Thanks
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Decisions decisions! I think you might do ok with either one of those approaches. There isn't one correct answer only. Is that what you were asking?
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I would go with the math because it is simpler, but either way can be acceptable, depending on how it is implemented.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic