aspose file tools*
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
Author

Java equivalent of setw

Stephen Ma
Greenhorn

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
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

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
Greenhorn

Joined: Sep 21, 2003
Posts: 7
Thanks a bunch, I'll give it a shot! This place is great!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java equivalent of setw