*
The moose likes Beginning Java and the fly likes Help! With the formatting of the percent! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Help! With the formatting of the percent!

Doug Con
Greenhorn

Joined: Feb 14, 2010
Posts: 7
I did this in the general section but I do need the help!

I just started doing java and one of my assignments require the format for the percent to be displayed but yet when I format it to display as a percent it reverts to just a nondecimal. What am I doing wrong. I have it print prior to format and all looks good(.0525) but when applying the format it shows 5% where is the 5.25%

Anyone?

Thanks


Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18509
    
  40


First, don't crosspost. It wastes people's time and effort.

Second, if you didn't get an answer, or understood the answer, then elaborate the question, or continue the discussion on the answer. To ask the exact same question, in the exact same way doesn't make sense -- did you expect for something different to happen?


Regardless, Here is the link to the previous question...

http://www.coderanch.com/t/482908/Java-General/java/Help-With-formatting-percent

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help! With the formatting of the percent!
 
Similar Threads
static method data validation in a dialog box app
Format the output
Class and Object Problem
Help! With the formatting of the percent!
Newbie Question : cannot resolve symbol : variable