Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Substring Loop - unsure how to do it.

807599Feb 15 2007 — edited Feb 19 2007
Hi guys


------------------------------------------------------------
Example Output:
------------------------------------------------------------
Enter a String :
S:Sc:Sco:Scop:Scope:
------------------------------------------------------------

Program reads in a String and outputs first character then a ":" then first 2 characters of string etc ... (as shown in example above using string Scope). Note: there are no spaces in the output.

But i don't have a clue how to write it, im always confused when it comes to SubStrings.

Any help would be grateful, cheers.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2007
Added on Feb 15 2007
15 comments
548 views