Solved

Format control in Java

Posted on 1997-10-23
1
190 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unable to open debugger port in Intellij idea 6 140
JList custom Cell Renderer refresh 15 53
Java Options in Zimbra Server 2 44
table example 4 20
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

919 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

21 Experts available now in Live!

Get 1:1 Help Now