This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Code cleanup

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if anybody could clean-up my code. I just implemented a two new lines and now one thing isn't working. I would probably be able to fix it if someone would clean up my code. By cleanup, I mean tell me what I don't need. There are lines I can get rid of but I don't know which ones because of the lengthiness of the code. Please help.
Thanks,
cc11rocks

Risk.java
 
Greg Brannon
Bartender
Posts: 563
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What "one thing" isn't working? Was it working before? What two new lines did you add? Why?

Finally, how is anyone supposed to know what code your program doesn't need?
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Brannon wrote:What "one thing" isn't working? Was it working before? What two new lines did you add? Why?

Finally, how is anyone supposed to know what code your program doesn't need?

When you enter 0 or blank, it return system errors. With my previous code, it worked. The new lines i added were:

instead of:

I changed the code to this because it was not accepting anything greater than 999 due to automatic commas by NumberFormat. So either way, I have issues. Because I'm not relying on nos and yos, maybe I could get rid of some lines. If you could help me with any of the problems described, that would be great
Thanks,
cc11rocks
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
john price wrote:When you enter 0 or blank, it return system errors.

What kind of errors? TellTheDetails.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic