|
-
how come 0 wont appear at end of decimal place
Can someone please help me why JAVA wont display the zero at the end of the decimal place. for instance,
double A = 6.000
by right A = 6.000
However, when i execute this System.out.println(A);
output of A = 6.0
Can someone tell me how do i keep the the value to 6.000. Not possible for me to use decimalformat class because I need variable A to be a double.
I write a program that round off value to 2 decimal places, However, it will only appear as 20.0 when the value is suppose to be 20.00, or show only 5.6 when it suppose to be 5.60. can someone please tell me how to solve this problem. thank in advance!
Similar Threads
-
By Marcos in forum VB Classic
Replies: 3
Last Post: 01-25-2006, 11:18 AM
-
By Ana in forum VB Classic
Replies: 5
Last Post: 04-27-2005, 03:16 PM
-
By Rob Teixeira in forum .NET
Replies: 129
Last Post: 06-06-2002, 05:23 AM
-
By Rattagarn V. in forum VB Classic
Replies: 5
Last Post: 10-09-2000, 07:36 AM
-
By Julian Milano in forum VB Classic
Replies: 2
Last Post: 08-11-2000, 12:11 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks