Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to insert new line character?

843838Nov 16 2005 — edited Sep 6 2008
Hi all,

I have two lines to print.
out.println("Available number of columns="+cols);
out.println("Number of columns must be present=10");
My problem is:
i want both the lines to be printed one below the other. But, it is displayed in one single line.....
Can anyone please tell me how to insert new line character?

I tried with \n, '\n' and \r\n but, in vain......

Thanks for your time.

Regards,
Ashvini
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2008
Added on Nov 16 2005
6 comments
392 views