• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array of Strings -- String  RSS feed

 
Arun Moose
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to do the following.

1. Convert a string into an array of strings, with each element in the array can take upto 1000 characters.

Eg: Say the string has 1500 characters, then the array should contain 2 elements. 1st element of the array contains the first 1000 characters of the string. 2nd element of the array contains the remaining 500 characters.

2. Also i have convert this array of strings back into a string.

Can you please help me on this?

//Arun
 
Arun Moose
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm really sorry for posting the same topic in different forums. I thought i'll get reply soon.

I request the administrator to remove the duplicate topic which i' created.

//Arun
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What is the specific problem you are facing in doing this? Did you consider using 'substring'?
 
Arun Moose
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to java and i don't have any idea about java API's. I'll try out the substring function.

Thanks!

//Arun
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should make yourself familiar with the API.
Reading all of the String class overview would be a good start.

http://java.sun.com/j2se/1.5.0/docs/api/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!