• Post Reply Bookmark Topic Watch Topic
  • New Topic

Line break in Java  RSS feed

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to use a line break in between the values I am appending. I am using a new line string in my code. But it is not working. I am getting all the appended values in a single string. I would appreciate if someone can help me with that.

Here is my sample code:

 
Sheriff
Posts: 22845
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't say what "getting" means in your problem description. Could you elaborate on that?
 
Sam Saha
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting means as follows:

Inputs:

String 1: My name is X
String 2: His name is Y

Output:

String out: My name is XHis name is Y

I wanted to display them like:

My name is X
His name is Y
 
Paul Clapham
Sheriff
Posts: 22845
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still didn't say how you are looking at that output.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!