Skip to Main Content

Java Programming

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 concatenate strings

948658Jul 11 2012 — edited Jul 18 2012
Hi Experts,

I am using Java for SAP Web Dynpro for Java application. I have received output in form of table data. The table data has 5 rows each containing a string

String1
String2
String3
String4
String5

I want to concatenate these five strings using a loop statement.

String s1 = "" ;
String s2 = "";
for (int x1=0; x1<wdContext.nodeOutPut_DisplayExpense_Text().size(); x1++){
s1 = wdContext.nodeOutPut_DisplayExpense_Text().getOutPut_DisplayExpense_TextElementAt(x1).getTextline();
s1 = s1 + wdContext.nodeOutPut_DisplayExpense_Text().getOutPut_DisplayExpense_TextElementAt(x1).getTextline();
}
wdContext.currentContextElement().setExpense_Text(s1);

Above code is not working. Could you please suggest?

Regards,
Gary
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2012
Added on Jul 11 2012
3 comments
208 views