This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
Similar Threads
Question on NumberFormat
Error from sudoku class
Changing textfield bgcolour upon entering data
Reservation-1 to 8 digits
How to get digits from a number using MessageFormat