This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Accessing of character by character from a String... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Accessing of character by character from a String...

Chan Lee
Greenhorn

Joined: Sep 02, 2008
Posts: 25
hiii friends,
Since I'm very new to JAVA, I've lots of doubts in my mind. Even they are silly doubts for you , as a bigginner I wanna know the solution.

One of my doubts is, I've

String s1 = new String("abcd");
String s3 = new String();
int len = s1.length();

I can't use .......
for(int i=0;i<len;i++)
s3[i] = s2[i];


Then,
how to access character by character from the String s1 and place one by one into s3?( I know that s1 = s3 will do this job. But, I want to assign one by one to String s3).
>
 
Don't get me started about those stupid light bulbs.
 
subject: Accessing of character by character from a String...
 
Similar Threads
retreaving the value in servlet which is set in session in a jsp page
parsing data and storing in the xml
Accessing of character by character from a String...
string assignment
Right way to concat Strings and then substring them ?