Grab the First Few Letters
easyQuestion 300The Substring method lets you pull out a smaller piece of a string. When you call Substring(startIndex, length), it returns the characters that begin at startIndex and continue for length characters. Positions are counted starting at 0. You are given a string named word set to "keyboard". Print just its first three characters by starting at index 0 and taking a length of 3.
Expected output
key= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.