Question: JAVA , can anyone tell why its wrong ??? can you please fix it.... thanks. NOTE: You need only write the method. You do not
JAVA , can anyone tell why its wrong ??? can you please fix it.... thanks.

NOTE: You need only write the method. You do not need to write the lass or any code to call or test the method 1.) Write a public method called findLastWord that takes a single paramatar of tupe String and returns a String yalue to the caller of the method 2.) The body of the method should extract the last word from the String that is passed into the methad and retum that word to the caller of the methad (You can assmethat the boundary or dellmeter between words are defined by a single space.) SUBMIT 8 of 8: Wed Aug 01 2018 17:11:25 GMT+ 1000 (Australian Eastern Standard Time) ? 3 public string findLastiord) String str String lastord str.substring(str.lostIndexof"+1); returnastord 12 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
