File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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 ! !
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: i want to display only 5- 8 digits
 
Similar Threads
Changing textfield bgcolour upon entering data
Error from sudoku class
Reservation-1 to 8 digits
How to get digits from a number using MessageFormat
Question on NumberFormat