Hi, In my java program I accepted string from the user and now I want to calculate the length of the string, and then read characters one by one to encrypt it. How to read the characters one by one ? Like Mid$ function in VB.
"As long as there are tests, there will be prayer in public <br />schools."
arun mahajan
Ranch Hand
Joined: Dec 07, 2001
Posts: 304
posted
0
To find the length of string use length() method AND THAN RUN IT IN A for loop fo charter finding perhaps folowin code willhelp:
hope it may help... Arun
Rohit Prakash Khare
Greenhorn
Joined: Jun 09, 2002
Posts: 6
posted
0
Thanks Arun, I will sure try.
John Loney
Greenhorn
Joined: Jun 03, 2002
Posts: 4
posted
0
Another approach similar to the $mid is substr(int begpos,int endpos) in a for loop