I have a simple program here, not nearly done, that I need a bit of help with.
Basically, the goal of the block of program that I need help with is to scan a string character by character, searching for a dollar sign. If a dollar sign is found, the program is supposed to scan ahead to the next dollar sign, appending the substring between them to another string.
How do I take what is inside the two dollar signs and add it to the new string?
//_-_-_The getWords Method
//This method gets words from the user and adds them to the final string.
static String getWords (String story){
String newStory = "";
for(i=0; i<story.length(); i++){
if(story.charAt(i) = '$')
newStory = newStory + story.charAt(i);
else ( This is Where I am Stuck