Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String.format problem

 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all

Why the below throws java.lang.ArrayIndexOutOfBoundsException.



when I change the value from 9.81 to 12.81, it run without exception.

Thank you,
Surasak Leenapongpanit
 
raj malhotra
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for 9.81 ,i am not getting any exception .It will print 10.
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Surasak Leenapongpanit:
Hi, all

Why the below throws java.lang.ArrayIndexOutOfBoundsException.



when I change the value from 9.81 to 12.81, it run without exception.

Thank you,
Surasak Leenapongpanit



When I tried, It's giving perfect solution i.e 13.

Just check the whole code once again or you can paste the code over here. SO that we can look into this issue.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic