• Post Reply Bookmark Topic Watch Topic
  • New Topic

Appending the String values mutiple times in a method  RSS feed

 
Amarendra Manchinasetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to write a method to append the string value already defined in method to the string value passed as an argument everytime. The is overwrite everytime when method is called. I need this to construct the emailbody with all string that are comming form the other function executions. i Have different databses to query and get the resultset and make it has HTML table and send to usergroup inthe form of email .For one database query it was working fine..

Please help me in this regard. I am new to java and try to implement this as one of my project requirement .I have the method signature. every time i called this method it is returning the last query result converted to string.


(Courtesy moderator edit: added code tags)
 
Junilu Lacar
Sheriff
Posts: 11493
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

When you post code, please UseCodeTags (←click on that, it's a link to a page that will tell just how to do that). The tags will preserve the code formatting that you paste in and make it easier for others to read.
 
Carey Brown
Saloon Keeper
Posts: 3323
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The logic in your appendBody(String emailBody) method does nothing except return emailBody. This doesn't particularly matter because in line 18 where you call this method you don't assign the return value to anything.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!