• Post Reply Bookmark Topic Watch Topic
  • New Topic

String and Array Question  RSS feed

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new very new to Java. I am trying to get the data from form and to email. Its Ok when there is a string but when array cames it became very difficuit for me to merge with string and mail it. Please check my following code

Thanks & best regards

[ March 22, 2008: Message edited by: farakh khan ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

I'm not sure what you're trying to do in the loop. Are you trying to add a TD cell for each element in the array? Or is it something like this:

[ March 22, 2008: Message edited by: Ulf Dittmer ]
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

I'm not sure what you're trying to do in the loop. Are you trying to add a TD cell for each element in the array? Or is it something like this:


[ March 22, 2008: Message edited by: Ulf Dittmer ]

I am getting 3 fields of form two of them are String and one is array and want to store in one variable as to mail or print.

msg1 is String
msg2 is Array
msg3 is String

Now am trying to store like:

mailmsg=msg1+msg2+msg3;

System.out.println(mailmsg) this gt me the output msg1,last index of msg2 and msg3. I have problem with msg2 as this is array. How can I merge with
mailmsg=msg1+msg2+msg3;

Thanks for your reply
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't that what the code I posted does? If not, tell us what exact output you're looking for.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot!

I am really thankful to you from the core of my heart

Thanks again
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!