wood burning stoves 2.0*
The moose likes Java in General and the fly likes Java equivalent of setw 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 » Java in General
Bookmark "Java equivalent of setw" Watch "Java equivalent of setw" New topic

Java equivalent of setw

Stephen Ma

Joined: Sep 21, 2003
Posts: 7
I'm trying to find the Java equivalent of setw in C++. Any tips on formatting will be greatly appreciated. I tried searching for this in earlier posts but I can't find it. Thanks!
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Hi Stephen,
Welcome to JavaRanch!
Use the java.util.DecimalFormat class. No, it's not as convenient as setw.

[Jess in Action][AskingGoodQuestions]
Stephen Ma

Joined: Sep 21, 2003
Posts: 7
Thanks a bunch, I'll give it a shot! This place is great!
subject: Java equivalent of setw
Similar Threads
ascii to binary conversion
find equivalent java file for a jsp in weblogic
Format number
The March of Progress
Aline decimals