Solved

Format control in Java

Posted on 1997-10-23
1
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

623 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