Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes i want to display only 5- 8 digits Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "i want to display only 5- 8 digits" Watch "i want to display only 5- 8 digits" New topic
Author

i want to display only 5- 8 digits

sandy indira
Greenhorn

Joined: Feb 03, 2010
Posts: 13
hi friends..

i am fetching data from the database and printing on the screen..the data is of numericals..

and the value contains 15 digits..

i want to display only 5- 8 digits...how can i do it???
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

Please look into the NumberFormat class. it will be of help


SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i want to display only 5- 8 digits