wood burning stoves
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

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: 24189

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!
Have you checked out Aspose?
subject: Java equivalent of setw
It's not a secret anymore!