This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

String and Array Question

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot!

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

Thanks again
reply
    Bookmark Topic Watch Topic
  • New Topic