Question: java programming Negatives Ask the user to enter a word and a negative index. Then print back one letter from the word:-1 gets the last
java programming
Negatives Ask the user to enter a word and a negative index. Then print back one letter from the word:-1 gets the last letter, -2 gets the second-to-last letter, and so on. Word Negative index Result cat -1 t cat -2 a cat -3 cat -4 should cause an error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
