Answered step by step
Verified Expert Solution
Question
1 Approved Answer
X990: Find Last Characters Write a method that will return a string composed of the last n characters of wholeString. For example: Running getSuffix(reading,
X990: Find Last Characters Write a method that will return a string composed of the last n characters of wholeString. For example: Running getSuffix("reading", 3) should return "ing" Running getSuffix ("Magic", 1) should return "c" Your Answer: 2 { 4} 5 public String getSuffix (String wholeString, int n) Check my answer! Reset Next exercise Feedback Your feedback will appear here when you check your answer. X991: Find Last Space Implement the following method so that it returns the index of the last space ("") in the string. For example: If we call this method with the string "I'm making Waffles", this method would return 10, which is the index of the "" character between the 'g' in "making" and the "W" in "Waffles". Your Answer: 1 public int indexOf LastSpace(String phrase) 2 { 3 4} Feedback Your feedback will appear here when you check your answer. Check my answer! Reset Next exercise
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started