In short, it usually depends on where your output is going. For example, if you are outputting to HTML, you just surround the text with <B></B> tags to make it bold, as well <font> tags for sizing and other options. If you are using Swing, there are a wide variety of libraries for formatting.
You can do some formatting of data types, such as truncating decimals to 2 digits using printf() the
Java Util Formatter API.
For simple PrintWriters, such as System.out as you listed, I do not believe you can control the format other than what I have listed above.