how to add new line char in String

hello,how can i add a new line character in a string.thanks
[80 byte] By [raviadhaa] at [2007-11-26 17:54:02]
# 1

> hello,

>

> how can i add a new line character in a string.

>

> thanks

By creating a new String.

You can do this by creating a StringBuilder (or if you have a JDK < 1.5 a StringBuffer) from your original String, use StringBuilder's insert(...) method and then assign StringBuilder's toString() to your original String.

prometheuzza at 2007-7-9 5:07:04 > top of Java-index,Java Essentials,Java Programming...
# 2
thanks
raviadhaa at 2007-7-9 5:07:04 > top of Java-index,Java Essentials,Java Programming...