Solved

Format control in Java

Posted on 1997-10-23
1
182 Views
Last Modified: 2008-03-06
Do you know anything in Java which can do format control like those format indicator in C such as %d %f ...

Actually, the problem I met is that when writing some math function in Java, I don't want to output some double values in scientific format like 1.0034872E-5.  Instead, I want to represent them like 0.00010034872.  Do you have any idea about that?  Thank you in advance.
0
Comment
Question by:feng042497
1 Comment
 
LVL 6

Accepted Solution

by:
jpk041897 earned 50 total points
ID: 1229481
Take a look at the Acme class library (freeware) at:

http://www.acme.com/java/

Specificaly, take a look at:

http://www.acme.com/java/software/Acme.Fmt.html

which is a class that does exactly what you want.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now