Assume that word is a variable of type String that has been assigned a value. Assume furthermore that this value always contains the letters "dr" followed by at least two other letters. For example: "undramatic", "dreck", "android", "no-drip".
Assume that there is another variable declared, drWord , also of type String. Write the statements needed so that the 4-character substring word of the value of word starting with "dr" is assigned to drWord . So, if the value of word were "George slew the dragon" your code would assign the value "drag" to drWord .
question
Page 1 of 17 Replies - 188 Views - Last Post: 03 October 2012 - 11:19 AM
Replies To: question
#3
Re: question
Posted 03 October 2012 - 10:47 AM
Your topic title is "question" this is not a very descriptive title as our rules say: Use "txt" speak (i.e. please, hlp, thanks)
Also the code you post should be between code tags
The String class has all the methods required to perform your task, more specifically indexOf() and subString()
Also the code you post should be between code tags
The String class has all the methods required to perform your task, more specifically indexOf() and subString()
#4
Re: question
Posted 03 October 2012 - 10:48 AM
yes i have no idea what the question is asking for can anyone clarify
#5
Re: question
Posted 03 October 2012 - 10:53 AM
Sounds like a 'copy & paste' home work question. If you truly do not understand what it's asking, then you should consult your instructor.
We can assist you with programming related questions to your code, however we are not in your class, so we are not familiar with your assignment.
We can assist you with programming related questions to your code, however we are not in your class, so we are not familiar with your assignment.
#6
Re: question
Posted 03 October 2012 - 10:53 AM
find in a word the string "dr"
store that "dr" and the two folling characters into an other variable names drWord
store that "dr" and the two folling characters into an other variable names drWord
#7
Re: question
Posted 03 October 2012 - 11:13 AM
This seems like a very clear assignment to me. Try to interpret it for us as well as you can, and bring us to the point where you're stuck.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|