cancel
Showing results for 
Search instead for 
Did you mean: 

Insert "\n" character or differents lines into a String

Former Member
0 Kudos

Hi,

I've developing a .par aplicattion. I need insert different lines into a String, into a DefaultTableViewModel:

Example:

Numer 1

Numer 2

...

I've tried inset this code: "String message = "Number 1 " + "\n" + "Numer 2" + "\n"... but that don't run.

How can I do it?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can use vector for achieving the same.

but i am not clear with your requirement, can u please specify what you mean by I need insert different lines into a String, into a DefaultTableViewModel I hope that will help us in understading your requirement

regards

Mrudula

former_member312910
Participant
0 Kudos

Hi

Declare a String Buffer and append the data to the buffer.

StringBuffer buff = new StringBuffer();

buff.append("data");

buff.append("\n");

buff.append("mode data");

String str = buff.toString();

Try this.

cheers

Deepu